0

I'm on Mac OS X 10.6 Snow Leopard. I just updated my Ruby stuff using:

sudo gem update

Unfortunately, it broke everything. When I try to run a simple command in my website directory, like:

rails generate model User

It failed, with this error:

Could not find gem 'rails (= 3.0.3, runtime)' in any of the gem sources listed in your Gemfile. Try running bundle install.

So I tried running bundle install rails. It succeeded! So I tried running rails. It failed. So I tried getting the Rails version by entering:

rails -v

Which failed with this error:

Could not find rake-0.8.7 in any of the sources
Try running bundle install.

But not only did it fail, it also created an empty folder rails/ruby/1.8 in my website directory.

This is a complete disaster for me as I am just a beginner in Ruby and Ruby on Rails, and even in the Terminal. Any help would be MUCH appreciated. Thanks.

Rits
  • 5,105
  • 4
  • 42
  • 53
  • I am not sure, how can I check? – Rits Dec 27 '10 at 03:00
  • I'm thinking maybe it is best to completely uninstall Rails and everything associated, is there an easy way to do this and install Rails again afterwards? – Rits Dec 27 '10 at 03:03
  • It seems your previous rails version is 2.x and current is 3.x. There're lots of differences between them. You could try to uninstall the rails gem and reinstall it with `sudo gem install rails --version=2.3` – Kevin Dec 27 '10 at 03:04

1 Answers1

1

all this stems from having a version of rack that is not exactly 1.0.1 iirc.

Even if you have a version ahead of it, your whole setup will not install properly.

Uninstall all versions of rack and make sure you only have that one.

As Justin said in your comments, now get rvm. Run, don't walk.

pjammer
  • 9,489
  • 5
  • 46
  • 56