Trouble on re-installing Ruby from scratch

六眼飞鱼酱① 提交于 2019-12-11 23:33:27

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!