[Rubygems-developers] [ rubygems-Bugs-25935 ] module installed by gem does not load when installation directory path contains space

noreply at rubyforge.org noreply at rubyforge.org
Mon Jul 6 13:59:32 EDT 2009


Bugs item #25935, was opened at 2009-05-16 22:40
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=25935&group_id=126

Category: RubyGems installer (setup.rb)
Group: v1.3.x
Status: Closed
Resolution: Accepted
Priority: 3
Submitted By: bazz bazz (bazz)
Assigned to: Luis Lavena (luislavena)
Summary: module installed by gem does not load when installation directory path contains space

Initial Comment:
* The following is example.
I install RoR through gem. "rails" command does not work.
---
C:\>rails
C:/Program Files/ruby-1.8/bin/rails:19:in `load': no such file to load -- "C:/Pr
ogram Files/ruby-1.8/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/rails" (LoadError)
        from C:/Program Files/ruby-1.8/bin/rails:19
---


* The investigation
line #386 in "rubygems.rb"
    File.join(spec.full_gem_path, spec.bindir, exec_name).sub(/.*\s.*/m, '"\&"')
      #=> Gem.bin_path returns "\C:/Program Files/ruby-1.8/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/rails\"

line #19 in "rails" this file is installed by gem
	load Gem.bin_path('rails', 'rails', version)
	  #=> Load error


* Workaround
line #386 in "rubygems.rb"
    -File.join(spec.full_gem_path, spec.bindir, exec_name).sub(/.*\s.*/m, '"\&"')
    +File.join(spec.full_gem_path, spec.bindir, exec_name)

This way was confirmed only my environment.


* The following is my environment.
---
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.3
  - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i386-mswin32]
  - INSTALLATION DIRECTORY: C:/Program Files/ruby-1.8/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: "C:/Program Files/ruby-1.8/bin/ruby.exe"
  - EXECUTABLE DIRECTORY: C:/Program Files/ruby-1.8/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mswin32-60
  - GEM PATHS:
     - C:/Program Files/ruby-1.8/lib/ruby/gems/1.8
     - C:/Documents and Settings/Administrator/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/
---



----------------------------------------------------------------------

>Comment By: bazz bazz (bazz)
Date: 2009-07-07 02:59

Message:
Many thanks.


----------------------------------------------------------------------

Comment By: Luis Lavena (luislavena)
Date: 2009-07-06 02:27

Message:
Fix applied in revision 2272.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=25935&group_id=126


More information about the Rubygems-developers mailing list