Dmat00
Dmat00

Reputation: 417

rvm not defaulting to newer version of ruby

I am using ruby on rails on Ubuntu 11.10. Ruby 1.8.7 works fine but I cannot get rvm to work with 1.9.3 or any other version.

When I run rvm reload, rvm list or rvm info, I get the following message:

bash: /usr/bin/rvm: No such file or directory

I have Ruby 1.9.3 installed via rvm and when I change the default it doesn't give me an error. But then when I check the ruby -v it defaults back to 1.8.7.

Also, when I check which ruby it shows the following:

/usr/local/bin/ruby

My guess is that it has something to do with the bash file. What do you suggest?

I am guessing that it isn't even installing it correctly.

This is what happens: I type the following into the prompt:

bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

And it outputs:

ERROR: Unable to checkout branch .

Upvotes: 1

Views: 860

Answers (2)

neerajskydiver
neerajskydiver

Reputation: 11

run the command

source /usr/local/rvm/scripts/rvm 

and then

type rvm | head -1 

you should get output -

rvm is a function.

And after that run

rvm use rvm use 2.0.0 --default

Upvotes: 1

Rasmus
Rasmus

Reputation: 554

Are you following the installation instructions from the rvm site? http://beginrescueend.com/rvm/install/

If you are then look at section 2 about the shell again. specifically this command that they tell you to run :-)

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

remember to reload or restart your shell after running that command.

Upvotes: 1

Related Questions