Bugs item #25734, was opened at 2009-04-29 21:05
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=575&aid=25734&group_id=126
Category: `gem install` command
Group: None
Status: Closed
Resolution: Accepted
Priority: 3
Submitted By: Paolo Angelini (pablito)
Assigned to: James Tucker (raggi)
Summary: Gem::Ext::RakeBuilder fails under windows if ENV['rake'] not set
Initial Comment:
line 22 of rake_builder.rb builds a rake command and defaults to
Gem.bin_path('rake') if ENV['rake'] is not set:
cmd = ENV['rake'] || Gem.bin_path('rake') rescue Gem.default_exec_format %
'rake'
unfortunately under windows Gem.bin_path('rake') is not an executable file and
line 26:
run cmd, results
raise an error:
'C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake' is not recognized as an int
ernal or external command,
operable program or batch file.
(see also <a
href='http://rubyforge.org/forum/forum.php?thread_id=32969&forum_id=2129'>this
thread</a>
Including Gem.ruby in the command solves the problem:
bin_path = /mswin/ =~ RUBY_PLATFORM ? "#{Gem.ruby} #{Gem.bin_path('rake')}" :
Gem.bin_path('rake')
cmd = ENV['rake'] || bin_path rescue Gem.default_exec_format % 'rake'
I didn't file a patch because I couldn't test this under linux and I wanted to
avoid any regression bug
this is my environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.2
- RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
- INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8
- RUBY EXECUTABLE: c:/ruby/bin/ruby.exe
- EXECUTABLE DIRECTORY: c:/ruby/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mswin32-60
- GEM PATHS:
- c:/ruby/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-04-30 14:59
Message:
James, take in consideration that "Gem.ruby" could be inside a PATH with spaces
and it need to be handled properly.
The same applies to rake.
----------------------------------------------------------------------
Comment By: James Tucker (raggi)
Date: 2009-04-30 09:10
Message:
Fixed in r2180.
----------------------------------------------------------------------
Comment By: James Tucker (raggi)
Date: 2009-04-30 09:05
Message:
What is required for normal operation on most builds should be:
"#{Gem.ruby} -rubygems #{Gem.bin_path('rake')}"
----------------------------------------------------------------------
Comment By: Luis Lavena (luislavena)
Date: 2009-04-29 21:19
Message:
The problem I see is that RakeBuild should use Gem.ruby + Gem.bin_path('rake')
and not rake directly.
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=575&aid=25734&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers