relative_path_from returns errors for "C:/" and "C:\\"
------------------------------------------------------

                 Key: JRUBY-3621
                 URL: http://jira.codehaus.org/browse/JRUBY-3621
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.2, JRuby 1.3RC1
         Environment: Windows XP, Java JRE6
            Reporter: Mark Donnelly


This fails on Windows:
  Pathname.new('C:/').relative_path_from(Pathname.new("C:\\test"))

This came from my attempt to run script/generate during the RailsConf tutorial. 
 Here's the full stack trace:

C:\cry>jruby -S script/generate controller test
c:/jruby/jruby-1.3.0RC1/bin/../lib/ruby/1.8/pathname.rb:711:in 
`relative_path_from': different prefix: "C:/" and "C:\\cry" (Argument Error)
        from 
C:/jruby/jruby-1.3.0RC1/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator/lookup.rb:110:in
 `use_component_sources!'
        from 
C:/jruby/jruby-1.3.0RC1/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator/lookup.rb:109:in
 `each'
        from 
C:/jruby/jruby-1.3.0RC1/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator/lookup.rb:109:in
 `use_component_sources!'
        from 
C:/jruby/jruby-1.3.0RC1/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator/lookup.rb:55:in
 `included'
        from 
C:/jruby/jruby-1.3.0RC1/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator.rb:38
        from 
C:/jruby/jruby-1.3.0RC1/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator.rb:31:in
 `require'
        from 
c:/jruby/jruby-1.3.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
 `require'
        from 
C:/jruby/jruby-1.3.0RC1/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
 `require'
        from 
C:/jruby/jruby-1.3.0RC1/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in
 `new_constants_in'
        from 
C:/jruby/jruby-1.3.0RC1/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in
 `require'
        from 
C:/jruby/jruby-1.3.0RC1/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/generate.rb:2
        from 
C:/jruby/jruby-1.3.0RC1/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/generate.rb:31:in
 `require'
        from 
c:/jruby/jruby-1.3.0RC1/bin/../lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
 `require'
        from C:\cry\script\generate:3


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to