Issues Installing jRuby with RVM

1

I'm running into an issue installing jRuby 1.7.0 with RVM on my Ubuntu 12.04.1 system. It seems RVM is messing up my $PATH because it's unable to find commands that are already installed on my system. Unfortunately, I haven't been able to find where the path is getting reset.

user@ubuntu:~$ rvm reinstall jruby-1.7.0
Removing /home/user/.rvm/src/jruby-1.7.0...
Removing /home/user/.rvm/rubies/jruby-1.7.0...
jruby-1.7.0 - #downloading jruby-bin-1.7.0, this may take a while depending on your connection...
jruby-1.7.0 - #extracting jruby-bin-1.7.0 to /home/user/.rvm/src/jruby-1.7.0
jruby-1.7.0 - #extracted to /home/user/.rvm/src/jruby-1.7.0
jruby-1.7.0 - #nailgun
jruby-1.7.0 - #installing to /home/user/.rvm/rubies/jruby-1.7.0
jruby-1.7.0 - #importing default gemsets (/home/user/.rvm/gemsets/)
/home/user/.rvm/scripts/db: line 61: awk: command not found
/home/user/.rvm/scripts/db: line 61: awk: command not found
/home/user/.rvm/scripts/db: line 61: awk: command not found
/home/user/.rvm/scripts/db: line 61: awk: command not found
/home/user/.rvm/scripts/db: line 61: awk: command not found
/home/user/.rvm/scripts/db: line 61: awk: command not found
/home/user/.rvm/scripts/db: line 61: awk: command not found
/home/user/.rvm/scripts/db: line 61: awk: command not found
/home/user/.rvm/scripts/db: line 61: awk: command not found
/home/user/.rvm/scripts/db: line 61: awk: command not found
Saving wrappers to '/home/user/.rvm/bin'.
/home/user/.rvm/scripts/list: line 214: sort: command not found
/home/user/.rvm/scripts/list: line 203: find: command not found
/home/user/.rvm/scripts/list: line 223: xargs: command not found
/home/user/.rvm/scripts/list: line 223: sort: command not found
user@ubuntu:~$ which awk
/usr/bin/awk
user@ubuntu:~$

I tried reinstalling RVM from scratch and ran into the same issue. It fails to locate commands that are in my path. I could edit the scripts to specify the exact location, but that's just silly --RVM should be checking the path.

senfo

Posted 2012-11-01T15:08:54.183

Reputation: 154

Can you try the same thing with --trace ? – richo – 2012-11-04T17:42:52.470

It looks to be the same issue as @arikan, which is now being tracked here https://github.com/wayneeseguin/rvm/issues/1291

– richo – 2012-11-04T17:43:16.560

Answers

1

It looks like we resolved it https://github.com/wayneeseguin/rvm/issues/1291#issuecomment-10053120 Here.

Can you check the output of

ls -l /bin/rvm

if it's an executable dated early this year, you'll need to remove it (or remove it's executable bit) but before you do, I would appreciate it if you could gist the content to work out how this has happened.

Thankyou.

richo

Posted 2012-11-01T15:08:54.183

Reputation: 359

I don't have RVM installed globally (I just run it out of ~/.rvm). The rvm file is both executable and dated 11/1/2012. Before I try updating, is there anything else you'd like me to look into? – senfo – 2012-11-05T22:15:40.757

That's dated the same as @arikan. rm -f /bin/rvm* will fix it. – richo – 2012-11-05T23:22:19.620

2

Getting the same error on Mac OSX 10.7.4, rvm 1.16.17 (stable). It seems rvm cannot find bash command that is already installed on my system.

>> rvm install jruby --debug
jruby-1.7.0 - #downloading jruby-bin-1.7.0, this may take a while depending on your connection...
jruby-1.7.0 - #extracting jruby-bin-1.7.0 to /Users/arikan/.rvm/src/jruby-1.7.0
jruby-1.7.0 - #extracted to /Users/arikan/.rvm/src/jruby-1.7.0
jruby-1.7.0 - #nailgun
jruby-1.7.0 - #installing to /Users/arikan/.rvm/rubies/jruby-1.7.0
jruby-1.7.0 - #importing default gemsets (/Users/arikan/.rvm/gemsets/)
Executing: '/Users/arikan/.rvm/scripts/gemsets' initial in environment jruby-1.7.0
-bash: date: command not found
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
-bash: mkdir: command not found
env: bash: No such file or directory
-bash: mkdir: command not found
Error running '' under ,
please read /Users/arikan/.rvm/log/jruby-1.7.0/gemsets.initial.log
-bash: cp: command not found
env: bash: No such file or directory
>> which bash
/bin/bash

arikan

Posted 2012-11-01T15:08:54.183

Reputation: 121