Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JRuby 1.6.5, JRuby 1.7.0.pre1
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Error when running 'bin/jruby' -
bin/jruby: 55: function: not found bin/jruby: 60: Syntax error: "}" unexpected
Cause:
The shebang line for bin/jruby says '#!/bin/sh'. On many systems, this will be a shell that supports the more modern function definition syntax for bourne-like shells, but on Ubuntu and maybe Debian, this shell is "dash" which is a very minimally-featured shell which fails on this syntax.
Simple example failing in /bin/sh:
% /bin/sh -c 'function foo { echo OK } && foo'
/bin/sh: function: not found
Patches for this:
- (jruby-1_6 branch) https://github.com/jruby/jruby/pull/86
- (master branch ) https://github.com/jruby/jruby/pull/87
Merged and closed the pull requests.
Thanks, Jordan!