Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Gem install fails when a source has a version of the gem in which version number contains a string

#42

If a gem has a version number which is appended by a string (for example oauth 0.3.7.pre1), gem install will fail, even if another (stringless) target version of the gem is specified in config.

While this is the only example of the problem I've been able to find, I suspect it may occur whenever a string is contained in a version number at any point, i.e. 1.3.beta.1, etc..

Following is the output:

irb(main):003:0> GemInstaller.install('--config required_gems.yml')
Malformed version number string 0.3.7.pre1
=> 1

And the contents of required_gems.yml:

defaults:
install_options: --include-dependencies --no-rdoc --no-ri gems:
- name: oauth version: '= 0.3.6'

The gem source used is: http://gems.rubyforge.org/

(You can see the offending gem version listed on the oauth gem page here: http://rubygems.org/gems/oauth)

Reported by onlywade · February 24th, 2010 @ 05:03 PM

State: resolved
Milestone: none
Assigned to: Chad Woolley Chad Woolley

Activity

  1. Chad Woolley
    Chad Woolley
    • State changed from new to hold

    What version of RubyGems are you using? Mostly likely it is an old one which does not support prereleases. If it is less than RubyGems 1.3.5, please upgrade to RubyGem 1.3.5 or 1.3.6 and try again.

    February 24th, 2010 @ 07:12 PM

  2. onlywade
    onlywade

    You're absolutely right, that cleared it up. Thanks for the swift response!

    February 24th, 2010 @ 07:31 PM

  3. Chad Woolley
    Chad Woolley
    • State changed from hold to open

    Glad it works now.

    It would be good if GemInstaller printed a descriptive error message in this situation. I'll keep this ticket open and put that in the next GemInstaller release.

    Thanks...
    -- Chad

    February 25th, 2010 @ 01:05 AM

  4. Chad Woolley

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.