Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.0.0
-
Fix Version/s: JRuby 1.1b1
-
Component/s: None
-
Labels:None
-
Environment:Hide> uname -a
Linux caffe.sfbay.sun.com 2.6.20-1.2952.fc6 #1 SMP Wed May 16 18:18:22 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
> java -version
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_01-b06, mixed mode)
> rails --version
Rails 1.2.3
Show> uname -a Linux caffe.sfbay.sun.com 2.6.20-1.2952.fc6 #1 SMP Wed May 16 18:18:22 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux > java -version java version "1.6.0_01" Java(TM) SE Runtime Environment (build 1.6.0_01-b06) Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_01-b06, mixed mode) > rails --version Rails 1.2.3
Description
After installing the rails gems and fixing the executable's permissions, when I try to create a new Rails app, the script fails with what appears to be an issue of how the script is interpreted.
> rails test
/opt/jruby-1.0/bin/rails: line 9: require: command not found
/opt/jruby-1.0/bin/rails: line 10: version: command not found
/opt/jruby-1.0/bin/rails: line 11: syntax error near unexpected token `('
/opt/jruby-1.0/bin/rails: line 11: `if ARGV.first =~ /^(.*)$/ and Gem::Version.correct? $1 then'
If I change the first line of the rails script to "#!/usr/bin/env jruby" (like the gem script) then it works fine, and it creates the test application. As with the rails executable permissions bug I reported earlier, I'm not sure where the problem lies, but I know this does not happen with the native Ruby interpreter.
What was the original shebang line in the rails bin-script before you changed it?