nicholasjon.com

Updating Rubygems

Here’s how I updated my MacBook Pro from Rails 1.2.1 to Rails 1.2.3:

sudo gem update --system sudo mv /usr/local/lib/ruby/gems/1.8/source_cache ~/tmp mv ~/.gem/ ~/tmp/ gem sources sudo gem install rails --include-dependencies

Those five lines of code took about an hour and some serious Googling to figure out. Ah well, back to work.

Update: You may (probably will) get an error after you run “sudo gem install rails—include-dependencies”. I’m not sure exactly why, but running the same command again will finally update your Rails install. Anyone with a better solution should feel free to pop a comment down below.

Continue Reading

Comments

Posted by Nick W at 2:15pm on 3/14/2007

Very timely, thanks! One little extra quirk here where I had to run the rails gem install command twice after getting:

ERROR: While executing gem … (Gem::GemNotFoundException) Could not find rails (> 0) in any repository

the first time (apparently related to source_cache getting re-initialized?)

Anyway, five minutes beats 60—I owe you a beer!


Posted by Nick at 6:39pm on 3/14/2007

I’ll take you up on that beer. :)

As for the error you got, I reran my little scriptlet up there and got it too. At least it works the second time — but I haven’t a clue what the difference is.


Posted by Adam Whitlock at 8:14am on 3/15/2007

I’m just lazy and use Locomotive…really lazy.


Posted by Nick at 5:41pm on 3/15/2007

I had no idea you were a Ruby guy Adam, awesome.


Posted by Adam Whitlock at 10:50am on 3/16/2007

I am and I’m not. I know how to get everything rolling and the basics, though if I take the plunge and try to use it, I know that I will be sucked in for a while. I should at least wait until after the wedding :P


Loading comment form Please wait...