rails script shebang line causes incorrect interpretation
---------------------------------------------------------
Key: JRUBY-1144
URL: http://jira.codehaus.org/browse/JRUBY-1144
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.0.0
Environment: > 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
Reporter: Nathan Fiedler
Assignee: Thomas E Enebo
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email