2

I'm using Ubuntu 10.10 64bit and have just switched over to using ZSH today. After I logged out and back in to load the new zsh I experienced this problem:

/home/map7/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/rubygems.rb:762:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError) from /home/map7/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/rubygems.rb:219:in `activate' from /home/map7/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/rubygems.rb:1065:in `gem' from /home/map7/.rvm/gems/ruby-1.9.2-p136/bin/rails:18:in `<main>' 

This problem is very similar to: Install Rails 3 on OSX with RVM

I have fixed the problem using the answer from that post but I would like to know if I'm doing this correctly and if there is a better way?

After completing these steps (thanks to marshally):

rvm update && rvm reload rvm gemset delete rails3 rvm install 1.9.2 rvm use 1.9.2 rvm gemset create rails3 gem install rails rvm use 1.9.2@rails3 

Then I entered command

$ rvm use 1.9.2 --default 

I still had to add the following to my .zshrc file:

[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm rvm use 1.9.2@rails3 

Should I have to enter these lines into the .zshrc for it to work? It seems like a work around?

I have tried 'rvm use 1.9.2@rails3 --default' but the problem still happens when opening a new terminal.

1 Answer 1

3

You shouldn't need the rvm use 1.9.2@rails3 line in your .zshrc.

I believe the problem mentioned in that post has been fixed in the current version of RVM, so that shouldn't be an issue anymore. With only the [[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm in your .zshrc, do you get the original error message, or is it just that your default gemset is not set?

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

3 Comments

I can remove the rvm use 1.9.2@rails3 but I must have these two lines in the .zshrc: '[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm' and 'rvm 1.9.2'
I also noticed that I had rails installed in the /usr/bin/rails directory to, which was never a problem when using bash. So I had to switch over to rvm system and uninstall that gem.
I no longer need the 'rvm use 1.9.2@rails3'. It could be that I've updated my packages a few times since this question and most likely RVM as part of that and the problem has gone away.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.