[win7] jruby.exe cmd line arg handling bug?

Quickly scanned JIRA, but didn’t find anything similar. If the following
appears to be a bug (works on MRI 1.9.3dev) I’ll submit a new issue and
start looking for a patch.

While playing around with giving my msysGit custom ruby command
superpowers https://gist.github.com/1245318#file_gitall.rb on my Win7
32bit box, I see:

C:\Users\Jon\Documents\PythonDev>jruby --1.9 \tools\gitall.rb
Error opening script file:
C:/Users/Jon/Documents/PythonDev/tools/gitall.rb (The system cannot find
the path specified)

C:\Users\Jon\Documents\PythonDev>jruby --1.9 /tools/gitall.rb
Error opening script file:
C:/Users/Jon/Documents/PythonDev/tools/gitall.rb (The system cannot find
the path specified)

Ok, Ok, you win, here’s the full paths…

C:\Users\Jon\Documents\PythonDev>jruby --1.9 C:\tools\gitall.rb
usage: git all GIT_COMMAND

C:\Users\Jon\Documents\PythonDev>jruby --1.9 C:/tools/gitall.rb
usage: git all GIT_COMMAND

C:\Users\Jon\Documents\PythonDev>irb
irb(main):001:0> File.expand_path ‘\tools\gitall.rb’
=> “C:/tools/gitall.rb”
irb(main):002:0>

My environment…

C:\Users\Jon\Documents\PythonDev>echo %PATH%
C:\Program Files\CollabNet\Subversion
Client;C:\Windows\system32;C:\Windows;C:\Windows\Sys
tem32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program
Files\ATI Technologies\A
TI.ACE\Core-Static;C:\Program Files\Microsoft Windows Performance
Toolkit;C:\tools;C:\Pyt
hon27\Scripts;C:\Python27;C:\jruby\bin;c:\scala\bin;c:\lua\bin;c:\groovy\bin;C:\gnuwin32\c
url\bin;C:\gnuwin32\diff\bin;C:\gnuwin32\grep\bin;C:\gnuwin32\findutils\bin;C:\gnuwin32\se
d\bin;C:\gnuwin32\gawk\bin;C:\gnuwin32\less\bin;C:\gnuwin32\upx\bin;C:\gnuwin32\coreutils
bin;C:\Program Files\Wix;C:\git\cmd

C:\Users\Jon\Documents\PythonDev>jruby --1.9 --version
jruby 1.6.4 (ruby-1.9.2-p136) (2011-08-23 17ea768) (Java HotSpot™
Client VM 1.7.0) [Windows 7-x86-java]

C:\Users\Jon\Documents\PythonDev>jruby --1.9 -S gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.8.11
  • RUBY VERSION: 1.9.2 (2011-08-23 patchlevel 136) [java]
  • INSTALLATION DIRECTORY: C:/jruby/lib/ruby/gems/1.9
  • RUBY EXECUTABLE: C:/jruby/bin/jruby.exe
  • EXECUTABLE DIRECTORY: C:/jruby/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • universal-java-1.7
  • GEM PATHS:
    • C:/jruby/lib/ruby/gems/1.9
    • C:/Users/Jon/.gem/jruby/1.9
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
    • :sources => [“http://rubygems.org”]
    • “gem” => “–no-ri --no-rdoc”
  • REMOTE SOURCES:

Jon


blog: http://jonforums.github.com/
twitter: @jonforums

Most people die of a sort of creeping common sense, and discover when it
is too late that the only things one never regrets are one’s mistakes.
- Oscar Wilde

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs