问题
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 therails 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
回答1:
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
来源:https://stackoverflow.com/questions/7496519/trouble-on-re-installing-ruby-from-scratch