Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6.2
    • Fix Version/s: JRuby 1.7.0.RC1
    • Component/s: Windows
    • Labels:
      None
    • Environment:
      jruby 1.6.2 (ruby-1.8.7-p330) (2011-05-23 e2ea975) (Java HotSpot(TM) Client VM 1.6.0_21) [Windows XP-x86-java]
    • Number of attachments :
      0

      Description

      Running into the following when using the gem gemedit to easily open installed gems in an editor.

      What it does is essentially this:

      edit_command.rb
            cmd = "#{options[:editor]} ."
            Dir.chdir(spec.full_gem_path) do
              exec cmd
            end
      

      This used to work ok on 1.6.0 under windows. However, now it doesnt seem like exec searches the PATH anymore when firing up the editor. I get:
      ERROR: While executing gem ... (Errno::ENOENT)
      No such file or directory - cannot execute

      If I set the full path to the editor I get the odd effect of the editor opening, but in the current directory where I issue the command, not spec.full_gem_path.

      I assume something must have changed with regards to #exec on windows between 1.6.0 and 1.6.2.

        Activity

        Hide
        Thomas E Enebo added a comment -

        Ben, can you give me a patch for the error in isBatch? Even if it does not completely fix the issue you discovered something I suspect is still wrong with that code?

        Show
        Thomas E Enebo added a comment - Ben, can you give me a patch for the error in isBatch? Even if it does not completely fix the issue you discovered something I suspect is still wrong with that code?
        Hide
        Ben Browning added a comment -

        I believe the isBatch code is still wrong, but it didn't fix anything in my testing. Ultimately my problem involved passing an empty string as one of the arguments to exec. So, that's likely a separate bug. I think the right thing to do is for me to create a JIRA for each of these bugs and attach separate patches to each JIRA.

        Show
        Ben Browning added a comment - I believe the isBatch code is still wrong, but it didn't fix anything in my testing. Ultimately my problem involved passing an empty string as one of the arguments to exec. So, that's likely a separate bug. I think the right thing to do is for me to create a JIRA for each of these bugs and attach separate patches to each JIRA.
        Hide
        Oliver Ferrigni added a comment -

        I think this issue still exists in 1.6.6. I opened http://jira.codehaus.org/browse/JRUBY-6432 before finding this and closing as duplicate.

        Show
        Oliver Ferrigni added a comment - I think this issue still exists in 1.6.6. I opened http://jira.codehaus.org/browse/JRUBY-6432 before finding this and closing as duplicate.
        Hide
        Celso Dantas added a comment -

        (copying my comment to here)

        The error persist in JRuby 1.6.7

        Can't run multiple arguments in Kernel.exec.

        Ex:

        > Kernel.exec("rspec", "spec")
        Errno::ENOENT: No such file or directory - cannot execute
        from org/jruby/RubyKernel.java:1709:in `exec'
        from (irb):1:in `evaluate'
        from org/jruby/RubyKernel.java:1083:in `eval'
        from c:/jruby-1.6.7/lib/ruby/1.8/irb.rb:158:in `eval_input'
        from c:/jruby-1.6.7/lib/ruby/1.8/irb.rb:271:in `signal_status'
        from c:/jruby-1.6.7/lib/ruby/1.8/irb.rb:155:in `eval_input'
        from org/jruby/RubyKernel.java:1410:in `loop'
        from org/jruby/RubyKernel.java:1183:in `catch'
        from c:/jruby-1.6.7/lib/ruby/1.8/irb.rb:154:in `eval_input'
        from c:/jruby-1.6.7/lib/ruby/1.8/irb.rb:71:in `start'
        from org/jruby/RubyKernel.java:1183:in `catch'
        from c:/jruby-1.6.7/lib/ruby/1.8/irb.rb:70:in `start'
        from c:/jruby-1.6.7/bin/irb:13:in `(root)'

        Show
        Celso Dantas added a comment - (copying my comment to here) The error persist in JRuby 1.6.7 Can't run multiple arguments in Kernel.exec. Ex: > Kernel.exec("rspec", "spec") Errno::ENOENT: No such file or directory - cannot execute from org/jruby/RubyKernel.java:1709:in `exec' from (irb):1:in `evaluate' from org/jruby/RubyKernel.java:1083:in `eval' from c:/jruby-1.6.7/lib/ruby/1.8/irb.rb:158:in `eval_input' from c:/jruby-1.6.7/lib/ruby/1.8/irb.rb:271:in `signal_status' from c:/jruby-1.6.7/lib/ruby/1.8/irb.rb:155:in `eval_input' from org/jruby/RubyKernel.java:1410:in `loop' from org/jruby/RubyKernel.java:1183:in `catch' from c:/jruby-1.6.7/lib/ruby/1.8/irb.rb:154:in `eval_input' from c:/jruby-1.6.7/lib/ruby/1.8/irb.rb:71:in `start' from org/jruby/RubyKernel.java:1183:in `catch' from c:/jruby-1.6.7/lib/ruby/1.8/irb.rb:70:in `start' from c:/jruby-1.6.7/bin/irb:13:in `(root)'
        Hide
        Charles Oliver Nutter added a comment -

        This is fixed by a recent update of jffi.

        Show
        Charles Oliver Nutter added a comment - This is fixed by a recent update of jffi.

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Patrik Sundberg
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: