简体   繁体   中英

Trouble on re-installing Ruby from scratch

I am using rvm (Ruby Version Manager) and I deleted some gems by running the gem update --system command. I had some serious problem so I decided to reinstall rvm and ruby 1.9.2 on my local machine (MacOS Snow Leopard 10.6.7).

Now, if I run the rails s command I get the following

$ rails s
/Library/Ruby/Site/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /Library/Ruby/Site/1.8/rubygems.rb:214:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:1082:in `gem'
from /usr/bin/rails:18

What I can do to solve the problem?


Other command outputs are:

$ which ruby
/Users/<my_username>/.rvm/rubies/ruby-1.9.2-p136/bin/ruby

$ type rvm | head -1
rvm is a function

This should give you a clean 1.9.2 install with rails:

$ rvm remove 1.9.2
$ rvm install 1.9.2
$ rvm use 1.9.2 --default
$ gem install rails

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM