Installing Ruby with RVM in Ubuntu 14.04

8,283

Can you check if your ~/.profile or ~/.bashrc have been modified by the RVM installer? They should, but there could have been something wrong with the installation (and honestly, I find RVM's instructions and installation procedure very confusing.)

If you want RVM to always be loaded on shell startup, you should put its initialization commands into your shell's configuration file. For Bash under Ubuntu (or any Linux), that'd be ~/.bashrc. On other operating systems, such as OS X, you'd rather put it in ~/.bash_profile.

You could try adding the commands by calling the following, mentioned in this blog post:

cd ~
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> .bashrc

Then, restart your shell, and RVM should be sourced.

Share:
8,283

Related videos on Youtube

agusgambina
Author by

agusgambina

Updated on September 18, 2022

Comments

  • agusgambina
    agusgambina over 1 year

    I installed RVM using the following command

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

    Then I restarted the terminal and executed this commands

    source ~/.rvm/scripts/rvm
    rvm requirements
    rvm install ruby
    rvm use ruby --default
    

    If I run this commands when I start the terminal I get ruby 2.1.2 as the default ruby version, but if I restart the terminal and I run

    ruby -v
    

    I get the following message

    The program 'ruby' can be found in the following packages:
     * ruby
     * ruby1.8
    Try: sudo apt-get install <selected package>