gerky
gerky

Reputation: 6417

Installing Ruby with RVM

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!

Upvotes: 1

Views: 2223

Answers (3)

Dylan Markow
Dylan Markow

Reputation: 124419

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

Upvotes: 6

Satish
Satish

Reputation: 6485

Try opening another terminal or run source .bash_profile

Upvotes: 3

Keith Gaddis
Keith Gaddis

Reputation: 4113

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

Upvotes: 2

Related Questions