1

I've been getting this 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!

3
  • 2
    try 'rvm list' and then 'rvm use <the rvm you installed rails on>' you need to load the environment rails live in first. Commented May 10, 2011 at 21:11
  • I did that and now I get this error: Could not find RubyGem rails (>= 0) (Gem::LoadError) from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:244:in activate_dep' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:236:in activate' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1307:in gem' from /usr/local/bin/rails:18:in <main>' --> it seems like it cant even find rails? I'm so confused T_T Commented May 10, 2011 at 21:15
  • ok try: 'rvm gem list' does rails show up there? Commented May 10, 2011 at 21:22

2 Answers 2

1

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>.

Sign up to request clarification or add additional context in comments.

4 Comments

Is there a way to automate the rvm use 1.9.2@rails3 command so that I don't have to enter it every single time? Thanks!
Yes. Run rvm --default use 1.9.2@rails3. This will set 1.9.2@rails3 as your default ruby/gemset so you can be sure to be using 1.9.2@rails3 whenever you open a new terminal.
Wow, now it throws this error: /Users/alexwang/.rvm/gems/ruby-1.9.2-p180@rails3/gems/mysql2-0.2.7/lib/mysql2.rb:8:in `require': dlopen(/Users/alexwang/.rvm/gems/ruby-1.9.2-p180@rails3/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError) ---> very frustrating =(
That's a different problem. Something to do with your mysql client library that cannot be found... as you've probably figured out. Did a quick search and found this.
0

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.

2 Comments

Yeah, I have the same exact problem! Is there a way that we can automate the "rvm use 1.9.2@rails3" command so that we dont have to enter it every single time? It's quite annoying to do so, but I guess I can live with it.
See my comment under my answer.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.