Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I force gem to upgrade to gem 1.3.1

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?

like image 481
Kyle Boon Avatar asked Feb 19 '09 18:02

Kyle Boon


People also ask

How do you update a gem to a specific version?

The correct way to update the version of a gem to a specific version is to specify the version you want in your Gemfile, then run bundle install . As for why your command line was failing, there is no -version option.

What does gem update -- system do?

gem update --system only updates RubyGems. gem update will update all installed gems to their latest versions, so it will update Rails to 3.0. 0. in your application folder.

How does gem install work?

What does gem install do? gem install , in its simplest form, does something kind of like this. It grabs the gem and puts its files into a special directory on your system. You can see where gem install will install your gems if you run gem environment (look for the INSTALLATION DIRECTORY: line):

How do I install gem packages?

With the --local ( -l ) option, you would perform a local search through your installed gems. To install a gem, use gem install [gem] . Browsing installed gems is done with gem list . For more information about the gem command, see below or head to RubyGems' docs.


1 Answers

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)
like image 192
mletterle Avatar answered Oct 03 '22 18:10

mletterle