Reputation: 5126
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.
Upvotes: 2
Views: 1809
Reputation: 78
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?
Upvotes: 3