Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: JRuby 1.0.0RC2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux cat-in-the-hat 2.6.21-1-686 #1 SMP Sat May 26 16:14:59 UTC 2007 i686 GNU/Linux
      (Debian using official packages from Debian unstable)
    • Number of attachments :
      0

      Description

      Issue GROOVY-1936 (http://jira.codehaus.org/browse/GROOVY-1936) also applies to the JRuby interpreter. When using the interpreter in the shebang of one of my own scripts, Linux's recursive shebang handling is screwed up, so it tries to run my script in bash (rather than in jruby).

      [bloom@cat-in-the-hat nouns]$ cat test.rb
      #!/usr/bin/jruby1.0
      puts "Hello"
      [bloom@cat-in-the-hat nouns]$ ./test.rb
      ./test.rb: line 2: puts: command not found

      The proper fix is to translate the jruby1.0 command to C, and to compile and install that on UNIX systems. Alternatively, speak to the linux-kernel mailing list about this, as I am uncertain whether this shebang handling behavior is a feature or a bug.

        Activity

        Hide
        Nick Sieger added a comment -

        I haven't heard of such a thing done before – although it would be possible with the advent of openjdk to ship a native launcher specific to JRuby, we aren't really interested in doing that at the moment.

        The usual workaround for this is to ensure /usr/bin is in your path and put

        #!/usr/bin/env jruby1.0
        puts "hello"
        

        at the top of your script.

        Show
        Nick Sieger added a comment - I haven't heard of such a thing done before – although it would be possible with the advent of openjdk to ship a native launcher specific to JRuby, we aren't really interested in doing that at the moment. The usual workaround for this is to ensure /usr/bin is in your path and put #!/usr/bin/env jruby1.0 puts "hello" at the top of your script.
        Hide
        Ken Bloom added a comment -

        I can't even imagine that there's a good place to document this that people will read it. We'll chalk it up to a secret that the community should know about and share on an ongoing basis.

        Show
        Ken Bloom added a comment - I can't even imagine that there's a good place to document this that people will read it. We'll chalk it up to a secret that the community should know about and share on an ongoing basis.

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            Ken Bloom
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: