This project is archived and is in readonly mode.

#3050 ✓wontfix
Kane

rake gems:install doesnt handle >= correctly

Reported by Kane | August 13th, 2009 @ 08:04 PM

  config.gem 'a_gem', :version => ">= 1.2.3"

rake gems:install only installs the newest version of this gem if the requirement isnt already met.

if version 1.2.3 is installed but 1.2.6 is available nothing happens.
if i didnt want to always install the newest version i could use '=' instead of '>='.

Comments and changes to this ticket

  • Matt Jones

    Matt Jones August 17th, 2009 @ 04:04 PM

    There's not much we can do about this - all the selection of which gem to install is in RubyGems, we just shell out to 'gem install' to do the work. You may want to raise this issue on the RubyGems Trac.

  • Kane

    Kane August 17th, 2009 @ 04:30 PM

    sorry for disappointing you but my rubygems (1.3.5) does the job right.
    i assume rails behaves different because the install routine checks if it is already installed with "installed?".

  • x0f

    x0f October 14th, 2009 @ 11:34 PM

    RubyGems (1.3.5) works for me too, seems to be a rails problem, is somewhat awkward bevavior.

  • Matt Jones

    Matt Jones October 15th, 2009 @ 12:28 AM

    • State changed from “new” to “wontfix”
    • Tag set to gems

    Looked at this again - it is a Rails thing. However, the existing behavior isn't wrong here; you're specifying that you'll take any version of some_gem >= Y, and you've got a version >= Y installed. gems:install assumes that things are cool if the specified dependencies are satisfied.

    Going further, changing this will mess up lots of deployment setups; it's not uncommon to see 'rake gems:install' in deploy scripts. Changing the behavior to "grab the most recent version that satisfies the requirement" will mean upgrading already-installed gems on deploy. Almost certainly NOT what is wanted in a production environment.

    It might be useful to have the functionality you're looking for as another command (maybe gems:upgrade?). But it doesn't seem like this would be a good change to make to gems:install.

    Marking as 'wontfix'; I'll reopen if somebody comes up with a patch to add gems:upgrade.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Tags

Pages