Bugs item #25935, was opened at 2009-05-16 10: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: Luis Lavena (luislavena)
Date: 2009-09-15 05:50

Message:
Alex,

What you copied isn't the same issue, please report it properly, including the 
output of your gem env and the gem install --debug -V command



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

Comment By: Alex Ju (aju)
Date: 2009-09-15 05:32

Message:
This issue happens to me again. 
RubyGems Environment:
-   Ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
-   Gem 1.3.5
-   WinXP 32bit

Still getting this error, I have verified that the Workaround is there on 
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)


Exception `NameError' at D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager
.rb:161 - uninitialized constant Gem::Commands::UpdateCommand
Updating installed gems
Exception `Gem::LoadError' at D:/Ruby/lib/ruby/site_ruby/1.8/rubygems.rb:827 - C
ould not find RubyGem sources (> 0.0.1)

Exception `Zlib::BufError' at D:/Ruby/lib/ruby/site_ruby/1.8/rubygems.rb:578 - b
uffer error
ERROR:  While executing gem ... (Zlib::BufError)
    buffer error
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems.rb:578:in `read'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems.rb:578:in `gunzip'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:165:in `fetch_
path'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:219:in `load_spe
cs'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:192:in `list'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:188:in `each'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:188:in `list'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:123:in `find_mat
ching'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:169:i
n `which_to_update'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:161:i
n `each'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:161:i
n `which_to_update'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:75:in
 `execute'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:257:in `invoke'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:132:in `proce
ss_args'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:102:in `run'
        D:/Ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:58:in `run'
        D:/Ruby/bin/gem:21
"

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

Comment By: bazz bazz (bazz)
Date: 2009-07-06 14:59

Message:
Many thanks.


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

Comment By: Luis Lavena (luislavena)
Date: 2009-07-05 14: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
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to