2

I installed RVM following the official guide on rvm. I installed Ruby 1.8.7 with rvm install 1.8.7 and then set it as default with rvm 1.8.7 --default.

Then I tried to install 1.9.2 with rvm install 1.9.2, and also tried rvm install 1.9.2-head. Everything went fine until I got to the "ruby-1.9.2-head - #installing-part".

Then I got a huge error list complaining about my *nix bash commands:

/Home/kevin/.rvm/scripts/Manager: line 1760: sed: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: mv: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1632: cp: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 233: mkdir: command not found
/Home/kevin/.rvm/scripts/utilities: line 237: date: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 233: mkdir: command not found
/Home/kevin/.rvm/scripts/utilities: line 237: date: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/Manager: line 1736: mkdir: command not found
/Home/kevin/.rvm/scripts/Manager: line 1738: ln: command not found
/Home/kevin/.rvm/scripts/Manager: line 1760: sed: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: mv: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1760: sed: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: mv: command not found
/Home/kevin/.rvm/scripts/Manager: line 1762: chmod: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 233: mkdir: command not found
/Home/kevin/.rvm/scripts/utilities: line 237: date: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command is not
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/Kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Home/kevin/.rvm/scripts/Manager: line 1562: cp: command not found
/Home/kevin/.rvm/scripts/Manager: line 1573: chmod: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 276: mkdir: command not found
/Home/kevin/.rvm/scripts/utilities: line 280: date: command not found
/Usr/bin/env: bash: The file or directory does not exist
/Home/kevin/.rvm/scripts/utilities: line 656: cp: command not found
/Usr/bin/env: bash: The file or directory does not exist

If I enter rvm 1.9.2 --default I get the same error output and my $PATH variable is completely cleared.

Does anyone have a solution on this problem?

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Kevin Sjöberg
  • 2,261
  • 14
  • 20

4 Answers4

4

To reinstall and start fresh remove RVM, just do rm -rfv ~/.rvm and also rm ~/.rvmrc if it's there.

Maybe "Install Rails 3 on OSX with RVM" will help you.

Community
  • 1
  • 1
Pragnesh Vaghela
  • 1,327
  • 12
  • 16
1

I have the same problem, it looks like the whole RVM script is broken. The rvm install ree command didn't fail but when running rvm use ree I started getting problems.

The $PATH variable is not empty, like with rvm use 1.9.2, but it missed some important paths like /bin and /usr/bin.

Here is an example console session:

calas@chamonix:~$ ls
Desktop  dev  Documents ...
calas@chamonix:~$ rvm use ree
info: Using /home/calas/.rvm/gems/ree-1.8.7-2010.02
calas@chamonix:~$ ls
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found
calas@chamonix:~$ rvm info
Command 'sed' is available in '/bin/sed'
The command could not be located because '/bin' is not included in the PATH environment variable.
sed: command not found
bash: grep: No such file or directory
bash: mkdir: No such file or directory
bash: grep: No such file or directory
/usr/bin/env: bash: No such file or directory

After running rvm info the $PATH variable is empty.

I removed the whole RVM installation with rvm implode and reinstalled but that didn't work.

I guess the solution is to downgrade or wait for a new release.


The solution is ready in the git source:

rvm update --head && rvm reload

and problem solved, thanks Wayne!

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
calas
  • 1,603
  • 1
  • 12
  • 15
  • "I guess the solution is to downgrade or wait for a new release.", actually, you should contact the author to let him know if you are having problems and suspect it is RVM itself, after having double-checked the installation process. – the Tin Man Jan 20 '12 at 15:07
  • Sure, that was the solution then, I contacted Wayne on IRC, he was very kind and came with a solution in less than 30 minutes. – calas Jan 23 '12 at 00:23
0

Something like this just happened to me and, upon closer inspection, I was just missing /user/bin on my path. But why?

Turns out, after some investigation, I was missing a colon before $PATH and this caused the first directory in the default path (i.e. /user/bin) to get omitted.

Once I changed this:
export PATH=$SCRIPTS:$WORKSPACE:$ANDROID_HOME:$HEROKU$PATH
to this:
export PATH=$SCRIPTS:$WORKSPACE:$ANDROID_HOME:$HEROKU:$PATH

(notice the colon added before the last '$')
Everything worked again. Obviously, your path will vary but check for missing colons.

gMale
  • 17,147
  • 17
  • 91
  • 116
0

Maybe "How to install Ruby on Rails in Ubuntu 11.10" will help you.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Jeet
  • 1,350
  • 1
  • 15
  • 32
  • I would recommend following the [standard RVM installation](http://rvm.beginrescueend.com/rvm/install) steps first, then, if those don't work, look to see what someone else has said. I've seen some unhelpful ideas in blogs that cloud the issue. – the Tin Man Jan 20 '12 at 15:10