Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.7.0.RC1
    • Fix Version/s: JRuby 1.7.0.RC2
    • Component/s: Ruby 1.9.3
    • Labels:
      None
    • Environment:
      Windows 7 / Windows Server 2008 R2
      JRuby 1.7.0.RC1
      Bundler 1.2.1
    • Number of attachments :
      0

      Description

      With JRuby 1.7.0.preview1 the following works fine:
      bundle exec "rake routes"

      With JRuby 1.7.0.RC1 the above command is broken, as are:
      bundle exec "rake assets:clean"
      bundle exec "rake assets:precompile"
      etc.

      When any of the above are run, the following exception is thrown:
      Unfortunately, a fatal error has occurred. Please see the Bundler
      troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!

      SystemCallError: Unknown error - No message available
              _exec_internal at org/jruby/RubyKernel.java:1658
                        exec at file:/C:/jruby/jruby-1.7.0.RC1/lib/jruby.jar!/jruby/kernel19/kernel.rb:23
                        exec at C:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/bundler-1.2.1/lib/bundler/cli.rb:428
                    __send__ at org/jruby/RubyBasicObject.java:1673
                        send at org/jruby/RubyKernel.java:2079
                         run at C:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27
                 invoke_task at C:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120
                    dispatch at C:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275
                       start at C:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408
                      (root) at C:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/bundler-1.2.1/bin/bundle:14
        with_friendly_errors at C:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4
                      (root) at C:/jruby/jruby-1.7.0.RC1/lib/ruby/gems/shared/gems/bundler-1.2.1/bin/bundle:14
                        load at org/jruby/RubyKernel.java:1045
                      (root) at C:\jruby\jruby-1.7.0.RC1\bin\bundle:23
      

        Activity

        Hide
        Thomas E Enebo added a comment -

        I have reproduced this issue. Hopefully, will get to the bottom of it soon. If you want a workaround in the meantime you can probably disable native execution and fall back to pure-Java support via 'set JRUBY_OPTS=-Xnative.enabled=false'. This may or may not be a good enough workaround as pure-Java mode does not emulate every possible thing we use native support for.

        Show
        Thomas E Enebo added a comment - I have reproduced this issue. Hopefully, will get to the bottom of it soon. If you want a workaround in the meantime you can probably disable native execution and fall back to pure-Java support via 'set JRUBY_OPTS=-Xnative.enabled=false'. This may or may not be a good enough workaround as pure-Java mode does not emulate every possible thing we use native support for.
        Hide
        Thomas E Enebo added a comment -

        Smaller test case from any simple Rails app:

        Kernel.exec "rake routes"
        
        Show
        Thomas E Enebo added a comment - Smaller test case from any simple Rails app: Kernel.exec "rake routes"
        Hide
        Thomas E Enebo added a comment -

        heh...one more layer down...This appears to be native exec not liking any bat file of any kind that has any arguments:

        Kernel.exec "gem"   # works
        

        Whereas:

        Kernel.exec "gem list"  # fails
        

        Getting closer.

        Show
        Thomas E Enebo added a comment - heh...one more layer down...This appears to be native exec not liking any bat file of any kind that has any arguments: Kernel.exec "gem" # works Whereas: Kernel.exec "gem list" # fails Getting closer.
        Hide
        Thomas E Enebo added a comment -

        Fixed in jnr-posix 2.3.1. We introduced a patch last version of jnr-posix which actually properly detected .bat files. Unfortunately, this change broke executing .bat files with any arguments.

        I added build of jnr-posix 2.3.1 into build_lib in the mean time. A fresh build of jruby from master should be enough for people to verify this is fixed for them. rc2 release will get put out once we get jnr-posix updated.

        Show
        Thomas E Enebo added a comment - Fixed in jnr-posix 2.3.1. We introduced a patch last version of jnr-posix which actually properly detected .bat files. Unfortunately, this change broke executing .bat files with any arguments. I added build of jnr-posix 2.3.1 into build_lib in the mean time. A fresh build of jruby from master should be enough for people to verify this is fixed for them. rc2 release will get put out once we get jnr-posix updated.
        Hide
        Benjamin Cardenas added a comment - - edited

        but i download the final 1.7.0 version and not work this patch. Not was integrated in final 1.7.0 version?. If not, how i can download the 1.7.0 rc2 version?

        Show
        Benjamin Cardenas added a comment - - edited but i download the final 1.7.0 version and not work this patch. Not was integrated in final 1.7.0 version?. If not, how i can download the 1.7.0 rc2 version?

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            Scott Nelson
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: