9

I'm new to Ruby on Rails and have just set it up in Ubuntu Linux following instructions I found here. Specifically,

As s.m. said, I uninstalled everything, then I opened another terminal session as a normal user and run:

bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) then i run source /home/my-desktop-username/.rvm/scripts/rvm as a normal user NOT ROOT

then i run rvm requirements as a normal user. Then I copy the requirements and close the session, open a root session and install the requirements using sudo

Then I close the session and open a normal user session and run rvm install ruby-1.9.3-p125 if you run this command as root, it will say that rvm is not installed and will suggest that you install it using sudo apt-get install rvm Don't do that!

So basically I had two problems, the tutorials that i followed didn't say that i should run

source /home/my-desktop-username/.rvm/scripts/rvm and didn't say that I should not run rvm as root, s.m told me that. Thanks to everyone, especially to s.m

That works well, but I will have to remember to

source .rvm/scripts/rvm

every time I open a terminal to work with Ruby on Rails.

Is there a way to permanently tell Ubuntu to look in .rvm for all the Ruby stuff?

Community
  • 1
  • 1
Colin Keenan
  • 1,089
  • 12
  • 20
  • Perhaps edit `.bashrc` or `.bash_profile` to include the line `source .rvm/scripts/rvm`? By the way, read http://stackoverflow.com/q/415403/220060 to decide whether you use `.bashrc` or `.bash_profile`. – nalply Oct 01 '12 at 13:05
  • Thanks for that link explaining all the different bash startup files. It will come in handy one day. For now,.bashrc works for my purposes in learning ruby since it's only run in interactive terminals and not in login to my system. – Colin Keenan Oct 02 '12 at 15:53
  • I was in a review log and didn't see that Basile Starynkevitch already answered your question. Ignore my comment. – nalply Oct 02 '12 at 15:57

1 Answers1

20

You need to add your

  source .rvm/scripts/rvm

into your $HOME/.bashrc file; read the advanced bash scripting guide for more.

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547
  • I'll definitely be going through that Advanced Bash Scripting Guide. Thaks for the link. – Colin Keenan Oct 01 '12 at 02:41
  • I tried putting this line in there but it did not worked for me, im using ubuntu 14.04 and `rvm 1.25.25 (stable) by Wayne E. Seguin , Michal Papis [https://rvm.io/]` – PallavSharma May 13 '14 at 05:01