Question

I'm trying to install Ruby on Rails using RVM. I am following this guide

http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/

I have just installed RVM, and used rvm install 1.9.2, but when I try to run ruby -v, I get this error

The program 'ruby' is currently not installed.  You can install it by typing:
sudo apt-get install ruby

I am not sure whether or not to install ruby using apt-get. The tutorial mentions to avoid using apt-get when installing ruby and stuff. Also, I installed ruby on RVM. I am confused, any help will be appreciated. Thanks in advance!

Was it helpful?

Solution

After you do rvm install 1.9.2, you need to tell RVM to use that installed version of Ruby:

rvm use 1.9.2

To make this the default:

rvm use 1.9.2 --default

You may need to do a source ~/.bashrc to update the changes, or even reboot/logout (Ubuntu sometimes doesn't fully reload everything until a complete reboot).

OTHER TIPS

Try opening another terminal or run source .bash_profile

When you installed RVM, did you remember to add this line to your ~/.bash_profile and reload your shell?

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top