Take the 2-minute tour ×

I installed jRuby to try it in a new project, but I didn't think it would affect my entire Ruby installation.

Now when I try to start an old project, I get an error

/usr/bin/env jruby: no such file or directory

I've tried searching for how to remove jruby, but don't come up with anything. is there a nice way to get my rails apps working again with regular ruby?

I REALLY hope so.

share|improve this question
add comment

2 Answers

Looks like it created symlinks; point them back at at the Ruby you want to use.

Use something like rvm to avoid this. (Or rbenv if you prefer.)

share|improve this answer
I use rvm, and ran rvm uninstall jruby, but I am still getting the error. Can you explain where I would find the 'symlinks'? –  pedalpete Dec 9 '11 at 16:29
@pedalpete If you're using rvm, set yourself back to the ruby you want to use. Check for an .rvmrc file; perhaps the project in question had one to force JRuby. –  Dave Newton Dec 9 '11 at 16:42
the project I'm trying to run never used jruby, but for some reason I'm getting this error. I don't see any .rvmrc files anywhere. I've gone through my configuration files, etc. etc and nowhere do I see any reference to jruby. I just rolled back the server to a previous state (vmware), and I still get the same jruby not found error. –  pedalpete Dec 9 '11 at 17:35
@pedalpete I don't know how you installed JRuby. You'll need to use which rails, which ruby, etc. to track down where the links are, if they're symlinks, etc. If you've used rvm properly, you should be able to use it to switch to a different ruby. –  Dave Newton Dec 9 '11 at 17:59
thanks dave, that lead me part of the way there. I found the link to jruby through which rails - <pre>#!/usr/bin/env jruby</pre> and edited taht to 'ruby', though I don't know if that is what I'm supposed to do. The whole app just hangs now when trying to run the server :( –  pedalpete Dec 9 '11 at 18:54
show 3 more comments

Rerun "bundle install" -- if you ran bundle install under jruby, the shebang for your scripts in the /bin folder was likely changed to reference jruby. By re-running bundle install under MRI, bundler will fix the shebangs for you.

share|improve this answer
add comment

Your Answer


