Reputation: 5231
I am trying to install a gem like this:
C:\InstantRails\rails_apps\foodmarksthespot>ruby script/plugin install git://github.com/lazyatom/engines.git
Which returns this message:
Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system` and try again.
But when I try to update using:
gem update --system
it says:
Updating RubyGems
Nothing to update
This is on windows. How can I force it to upgrade the system to a specific version?
Upvotes: 10
Views: 16509
Reputation: 1878
For anyone stumbling upon this question recently: In order to install a specific older version of RubyGems (probably to maintain a legacy application, as I did) I had to do the following, as the previous answers didn't work:
$ gem install -v 1.3.7 rubygems-update && \
$ ruby `gem env gemdir`/gems/rubygems-update-1.3.7/setup.rb
$ gem -v
1.3.7
As documented here: http://www.chentianwen.net/wordpress/2011/05/24/how-to-update-rubygems-to-a-specific-version/
Upvotes: 2
Reputation: 1406
If you want to install a specific version then try like the following.
$gem install -v=version_number package_name
For example in your case it should be,
$gem install -v=1.3.1 RubyGems
Upvotes: 1
Reputation: 3968
http://rubyforge.org/forum/forum.php?forum_id=28071
From there:
NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see "Nothing to update". If you have an older version of RubyGems installed, then you can still do it in two steps: $ gem install rubygems-update (again, might need to be admin/root) $ update_rubygems (... here too)
Upvotes: 16
Reputation: 18484
What do you get if you run gem --version
in cmd? It sounds like the gem executable you are running in cmd is not the same one Rails is using.
Upvotes: 0