I recently followed some instructions with RVM to install ruby-debug
and I think it might have caused some problems. The link that I found the instructions are here: http://beginrescueend.com/support/troubleshooting/
The commands I used to install are the following:
$ rvm reinstall 1.9.3 --patch debug --force-autoconf
$ gem install ruby-debug19 -- --with-ruby-include="${MY_RUBY_HOME/rubies/src}"
Now, when I try to start the rails server, I receive the following error:
./bundler_stubs/rails:13:in `require': no such file to load -- rubygems (LoadError)
from ./bundler_stubs/rails:13
This SO question would lead me to believe that I have more than one version of rails installed: no such file to load -- rubygems (LoadError)
However, when I run which -a ruby
as the selected answer suggests, I only receive /usr/bin/ruby
. Any thoughts on what to do here?
You need to explicitly activate the installed Ruby version before using it.
which ruby
should now point to the new version.You can set a default Ruby version with
Another option is to have that Ruby version activated in your project folder. This can be achieved by placing a .rvmrc file there. E.g.
Now you will need to install all your gems (including rubygems, rails etc.) for that particular (rvm) Ruby version, e.g.
Try adding
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
to your.bash_profile
(if you're on a Mac) or your.bashrc
(if you're in Linux). Seems like your RVM path isn't being loaded, so the wrong Ruby version is being called.