Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu rvm setup issue

I followed this tutorial below:

https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm

This worked perfectly for me; however, I have one small problem?

Each time I open a new terminal I have to run this command in order for rails to work:

source ~/.rvm/scripts/rvm

What is the problem and why is rvm not recognized

This is what I see after I open a new terminal and verify rails:

robert@rob:~$ rails -v The program 'rails' is currently not installed. You can install it by typing: sudo apt-get install rails

Thanks

like image 776
robasc Avatar asked Oct 11 '25 21:10

robasc


1 Answers

I highly recommend you to use the official website to install RVM: https://rvm.io/rvm/install


Your problem is that RVM is not loaded when you open a new terminal, this is why you have to manually add the source at each instance of the Terminal.

To solve this, run this command line: (if using login-shell)

echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile

Or this (if using non-login shell):

echo "source $HOME/.rvm/scripts/rvm" >> ~/.bashrc

This will add the path to RVM to load at each Terminal instanciation (close & re-open a terminal after you did this).


Take a look at @mpapis comments

like image 125
MrYoshiji Avatar answered Oct 14 '25 12:10

MrYoshiji



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!