Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue in Rvm Installation, running in binary mode

I installed rvm using commands which by convention should return rvm as a function

1) bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
2) echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
3) source .bash_profile
4) type rvm | head -1

    should return ("rvm is a function") // and it returned, rails was perfectly fine yesterday.

It worked perfectly yesterday, but now today when I am checking out rails. Its saying rails is not installed.

   type rvm | head -1
   returns "RVM is Hashed".

Here is something that i got from official site, but i dont know next I should do. So the question is:

What should be done to get the rvm installed in a function mode and not binary mode?

like image 613
Swati Aggarwal Avatar asked Mar 06 '12 05:03

Swati Aggarwal


2 Answers

One possible reason might be that RVM is not being accessible from .bash_profile file so try out using .bashrc file instead of .bash_profile.

Copy and paste following commands into the terminal

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc
source ~/.bashrc

Hope it works for you. worked for me cheers !!

===== Edit =====

The following should work in all cases :

curl -L https://get.rvm.io | bash -s stable
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bashrc
like image 62
Sahil Grover Avatar answered Oct 26 '22 11:10

Sahil Grover


You should use a login shell in console you can test it by issuing:

$SHELL -l

it is possible to configure your terminal to use a login shell:

  • https://rvm.io/integration/gnome-terminal/
  • https://rvm.io/workflow/screen/
  • for other terminal emulators you need to read respective manual
like image 26
mpapis Avatar answered Oct 26 '22 10:10

mpapis