user1604093
user1604093

Reputation: 89

Ubuntu cannot find "gems" package after installing Ruby with RVM

I was following this tutorial (http://railsapps.github.io/installrubyonrails-ubuntu.html) of installing ruby with RVM on Xubuntu 14.04 running on virtual box. I completed this step with success:

$ \curl -L https://get.rvm.io | bash -s stable --ruby

However afterward I tried to run gem -v and got this output:

The program 'gem' can be found in the following packages:

  • ruby
  • rubygems

Try: sudo apt-get install

I also tried to reinstall Ruby with the argument --autolibs=enable but it did not change the outcome.

EDIT:

Running rvm list output:

rvm rubies

=* ruby-2.1.5 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

Upvotes: 1

Views: 2950

Answers (2)

Asarluhi
Asarluhi

Reputation: 1290

Look at your ~/.bash_profile file. If you see a line like:

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

then you just need to restart the machine (or log out and log in back). Otherwise follow the Tin Man's instructions above, log out and log in again (or restart the machine).

Upvotes: 1

JTG
JTG

Reputation: 8846

In your ~/.bashrc file paste this line at the bottom:

source "$HOME/.rvm/scripts/rvm"

Then restart your terminal session, and you should be able to gem install via RVM.

Upvotes: 6

Related Questions