开发者

Rails Installation Error

开发者 https://www.devze.com 2023-03-05 10:22 出处:网络
I\'ve been getting t开发者_Python百科his error after installing rvm and rails with rvm. Can anyone help me out?

I've been getting t开发者_Python百科his error after installing rvm and rails with rvm. Can anyone help me out?

/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

Thanks!


Couple of things to look at:

  • Make sure Rails is indeed installed. I'm bringing up this point because you mentioned that you installed Rails with RVM, which is inaccurate. You install Rubies with RVM but you install Rails with Bundler (you can see Bundler as an RVM for gems rather than rubies). So ensure that you have a line that says gem 'rails' in your Gemfile and then run bundle install.

  • As pointed out by other answers, make sure you are using the right ruby and gemset (where you installed the Rails gem). To do so run rvm use <your_ruby>@<your_gemset>.


Are you sure you're actually in the RVM Ruby right now? I often hit this error when I forget to enter rvm use MY_RUBY_VERSION. It's looking for the rails gem, but can't find it.

0

精彩评论

暂无评论...
验证码 换一张
取 消