cant do a gem update (to Rubygems 1.3.1)

Aptana RadRails discussion.

Moderator: Aptana Staff

cant do a gem update (to Rubygems 1.3.1)

Postby nastycanasta » Tue Dec 23, 2008 5:53 am

Anytime I try and do something in the console I get this...

Code: Select all
Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system` and try again.


So at the command prompt I type this...

Code: Select all
C:\Users\me>gem update --system
Updating RubyGems
Nothing to update

Then I try this...

Code: Select all
C:\Users\me>gem update 1.3.1
Updating installed gems
Nothing to update


So how do I get the latest gem update?
nastycanasta
 
Posts: 11
Joined: Wed Dec 10, 2008 7:26 pm

Postby cwilliams » Tue Dec 23, 2008 4:28 pm

OK, so you're actually running into a Rubygems bug (which I also ran into and find very annoying).

Many users can't simply run "gem update --system" to upgrade from Rubygems 1.1 or 1.2 to 1.3.x, as a result of a bug in Rubygems itself. Typically that is the correct command, though.

They've hidden the "workarounds" in their release notes (quoted below). You'll have to start trying the bottom two paths to update (starting with "gem install rubygems-update")

If you have a recent version of RubyGems (0.8.5 or later), then all
you need to do is:

$ gem update --system (you might need to be admin/root)

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".

NOTE: You may have to run the command twice if you have any previosly
installed rubygems-update gems.

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)

If you don't have any gems install, there is still the pre-gem
approach to getting software ... doing it manually:

1. DOWNLOAD FROM: http://rubyforge.org/frs/?group_id=126
2. UNPACK INTO A DIRECTORY AND CD THERE
3. INSTALL WITH: ruby setup.rb (you may need admin/root privilege)
User avatar
cwilliams
 
Posts: 2061
Joined: Thu Mar 29, 2007 11:21 pm
Location: Rochester, NY

Postby nastycanasta » Tue Dec 23, 2008 7:40 pm

Thanks bro, worked perfect. Thanks for all the help so far. I'm sure I'm going to need more as I move forward here....
nastycanasta
 
Posts: 11
Joined: Wed Dec 10, 2008 7:26 pm

Re: cant do a gem update (to Rubygems 1.3.1)

Postby jamesw » Wed Feb 04, 2009 3:18 am

Thank you for this.
Was having big problems creating a new rails project and not had any previous problems with updating gems I was getting really frustrated.

A quick note for windows XP users
I ran the

gem install rubygems-update

command from inside the Aptana Studio console rails shell and this worked with no problems, but you have to open up a cmd prompt to run the

update_rubygems

command.

cd into the bin directory for your Rails installation and run the command from there.

Hint - In the rails shell console view you will see the path you need to cd to but without the final \rails.
In my case this was c:\development\instantrails\ruby\bin

Don't know aout Vista though and can well imagine problems with this.

Hope this helps
jamesw
 
Posts: 24
Joined: Sun Jan 18, 2009 12:11 am

Re: cant do a gem update (to Rubygems 1.3.1)

Postby gers32 » Thu Feb 19, 2009 3:38 pm

Thanks for the info. I can confirm that the update worked fine in Vista.

Unfortunately, the whole reason I had to update rubygems was to run "rake rails:update:config"; unfortunately, this is the error message I get when I run it:

rake rails:update:config --trace
(in C:/Users/Christophe/workspace/FDS_Server)
rake aborted!
Don't know how to build task 'rails:update:config'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1706:in `[]'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2018:in `invoke_task'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
c:/ruby/bin/rake:19:in `load'
c:/ruby/bin/rake:19
Modesty is the art of drawing attention to whatever it is you are being humble about.
gers32
 
Posts: 14
Joined: Mon Jul 09, 2007 9:12 am

Re: cant do a gem update (to Rubygems 1.3.1)

Postby gers32 » Thu Feb 19, 2009 3:54 pm

My mistake: I forgot the 's' in "configs"...
Modesty is the art of drawing attention to whatever it is you are being humble about.
gers32
 
Posts: 14
Joined: Mon Jul 09, 2007 9:12 am


Return to Aptana RadRails