Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash error while installing jruby #1291

Closed
arikan opened this issue Nov 4, 2012 · 19 comments
Closed

bash error while installing jruby #1291

arikan opened this issue Nov 4, 2012 · 19 comments
Assignees

Comments

@arikan
Copy link

arikan commented Nov 4, 2012

rvm 1.16.17
GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)
mac osx

rvm cannot run bash somehow, while installing gemsets. Seems like the path is getting reset or something. I get same error with rvm stable version. Any idea how to resolve it?

>> rvm install jruby --debug
jruby - install
Found remote file http://jruby.org.s3.amazonaws.com/downloads/1.7.0/jruby-bin-1.7.0.tar.gz
http://jruby.org.s3.amazonaws.com/downloads/1.7.0/jruby-bin-1.7.0.tar.gz - #configure
jruby-1.7.0 - #download
Fetching: http://jruby.org.s3.amazonaws.com/downloads/1.7.0/jruby-bin-1.7.0.tar.gz?rvm=1.16.17
Fetch command: curl  -f -L --create-dirs -C - -o bin-jruby-1.7.0.tar.gz
Archive checksum matched, not downloading
Downloaded archive checksum matched.
__rvm_package:2: list /Users/arikan/.rvm/archives/bin-jruby-1.7.0.tar.gz
jruby-1.7.0 - #extract
__rvm_package:3: extract /Users/arikan/.rvm/archives/bin-jruby-1.7.0.tar.gz /Users/arikan/.rvm/rubies
jruby-1.7.0 - #validate
jruby-1.7.0 - #setup
no file given for __rvm_sed_i
env: bash: No such file or directory
jruby-1.7.0 - #importing default gemsets (/Users/arikan/.rvm/gemsets/), this may take time ...
Executing: '/Users/arikan/.rvm/scripts/gemsets' initial in environment jruby-1.7.0
/Users/arikan/.rvm/scripts/functions/environment: line 189: 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
/Users/arikan/.rvm/scripts/selector_gemsets: line 105: mkdir: command not found
env: bash: No such file or directory
/Users/arikan/.rvm/scripts/selector: line 404: mkdir: command not found
Error running '' under ,
please read /Users/arikan/.rvm/log/jruby-1.7.0/gemsets.initial.log
env: bash: No such file or directory
/Users/arikan/.rvm/scripts/functions/support: line 122: mv: command not found

Others get the same error on Ubuntu.
http://superuser.com/questions/497726/issues-installing-jruby-with-rvm

@richo
Copy link
Member

richo commented Nov 4, 2012

Can you gist the contents of your shell init files?

@richo
Copy link
Member

richo commented Nov 4, 2012

Also, can you try the same thing with --trace?

@arikan
Copy link
Author

arikan commented Nov 4, 2012

here is my bash_profile
https://gist.github.com/4012767

@richo
Copy link
Member

richo commented Nov 4, 2012

Nothing looks amiss in there.

You do have an enormous PATH by the time this runs. Assuming that --trace turns up nothing interesting, I'd be curious to see what happens with less. It's possible that at some point PATH gets truncated.

(As an aside, setting TERM in your dotfiles is rarely a good idea, as an fyi)

@arikan
Copy link
Author

arikan commented Nov 4, 2012

also here is the result of:
rvm install jruby --trace
https://gist.github.com/4012780

@richo
Copy link
Member

richo commented Nov 4, 2012

Ok, you can workaround the issue for now with

sudo ln -s /bin/bash /usr/bin/bash

I'll get a patch together in a sec.

@richo
Copy link
Member

richo commented Nov 4, 2012

Did you install rvm somewhere vaguely bizarre?

__rvm_which rvm is returning /bin/rvm in your trace, can you confirm if that's brokeness deep inside rvm or rvm installed to /bin?

@arikan
Copy link
Author

arikan commented Nov 4, 2012

which rvm
/Users/arikan/.rvm/bin/rvm

isn't it the right place?

@richo
Copy link
Member

richo commented Nov 4, 2012

Do you get the same result from

__rvm_which rvm ?

@arikan
Copy link
Author

arikan commented Nov 4, 2012

yes

__rvm_which rvm
/Users/arikan/.rvm/bin/rvm

@richo
Copy link
Member

richo commented Nov 4, 2012

Ok, I think I have it worked out.

What's the output of ls -l /bin/rvm ?

At some point something appears to have installed something executable there, which normally does nothing, but once all the other RVM paths are removed, suddenly it matches and breaks everything.

@arikan
Copy link
Author

arikan commented Nov 4, 2012

hmm this is the output

ls -l /bin/rvm
-rwxrwxr-x  1 root  wheel  1039 Jan 11  2012 /bin/rvm

@richo
Copy link
Member

richo commented Nov 4, 2012

Hah. I don't suppose you remember what you were doing on Jan 11 this year?

If you remove that file, all will come good.

Before you do though, can you check there's nothing senstiive in it and gist it? I'm hoping to match it up to a revision of RVM and work out how it got there, since it's obviously not a standalone case.

@arikan
Copy link
Author

arikan commented Nov 4, 2012

hmm ok, I see these

cd /bin/rvm
rvm            rvm-auto-ruby  rvm-exec       rvm-installer  rvm-prompt     rvm-shell      rvmsudo

@richo
Copy link
Member

richo commented Nov 4, 2012

Yeah, you'll want to nuke them all.

It looks like somehow you wound up with rvm essentially installed in /

Not sure if this was a glitch in the system wide installer around that time this year, but no good can come of it

@arikan
Copy link
Author

arikan commented Nov 4, 2012

thanks a lot richo, now it all works :) i was stucked all day.

@richo richo closed this as completed Nov 4, 2012
@ghost ghost assigned richo Nov 4, 2012
@tjwebb
Copy link

tjwebb commented Dec 3, 2012

I also hit this issue, but ls -l /bin/rvm returns nothing. rvm has screwed up my entire PATH...

The command could not be located because '/usr/bin' is not included in the PATH environment variable.

@mpapis
Copy link
Member

mpapis commented Dec 3, 2012

@tjwebb what version of rvm? have you tried after rvm get head?

@tjwebb
Copy link

tjwebb commented Dec 3, 2012

tjwebb@abshnasko:~/workspace/tools/cartodb$ rvm -v
rvm 1.17.0 (stable) by Wayne E. Seguin wayneeseguin@gmail.com, Michal
Papis mpapis@gmail.com [https://rvm.io/]

I'll run 'rvm get head' and see if that helps

On Mon, Dec 3, 2012 at 12:05 PM, Michal Papis notifications@github.comwrote:

@tjwebb https://github.com/tjwebb what version of rvm? have you tried
after rvm get head?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1291#issuecomment-10961590.

@pkuczynski pkuczynski added this to the rvm-1.27.0-before milestone May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants