问题描述
我使用 rvm
(Ruby Version Manager),并通过运行 gem update --system
命令。我有一些严重的问题,所以我决定在本地机器上重新安装 rvm
和 ruby 1.9.2
(MacOS Snow Leopard
现在,如果我运行 rails s
命令,我会得到以下内容
$ 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:在`gem'
从/ usr / bin / rails:18
我能做些什么来解决这个问题? 其他命令输出是: 这应该给你一个干净的1.9.2安装与铁轨: I am using Now, if I run the What I can do to solve the problem? Other command outputs are: This should give you a clean 1.9.2 install with rails: 这篇关于麻烦从头重新安装Ruby的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
$ which ruby
/Users/<my_username>/.rvm/rubies/ruby-1.9.2 -p136 / bin / ruby
$ type rvm | head -1
rvm是一个函数
$ rvm删除1.9.2
$ rvm install 1.9.2
$ rvm使用1.9.2 - 默认
$ gem install rails
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).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
$ which ruby
/Users/<my_username>/.rvm/rubies/ruby-1.9.2-p136/bin/ruby
$ type rvm | head -1
rvm is a function
$ rvm remove 1.9.2
$ rvm install 1.9.2
$ rvm use 1.9.2 --default
$ gem install rails