Installing gem with native extension fails
------------------------------------------

                 Key: JRUBY-4833
                 URL: http://jira.codehaus.org/browse/JRUBY-4833
             Project: JRuby
          Issue Type: Bug
          Components: Standard Library
    Affects Versions: JRuby 1.5
         Environment: Windows XP
            Reporter: Pepijn Van Eeckhoudt
            Assignee: Thomas E Enebo
             Fix For: JRuby 1.5.1


I have JRuby installed in C:/Program Files/jruby-1.5.0. When trying to install 
a gem with native extensions I get the error below. The error is triggered by 
lib/ruby/site_ruby/1.8/rubygems/ext/rake_buildr.rb.
In self.build Gem.bin_path is used to retrieve the path to rake. On my 
configuration the returned string contains a space and this string is not being 
quoted. Changing the code in that method to the code below resolves the issue 
by correctly quoting the string.

Modified code:
dest_path = '"' + dest_path + '"' if dest_path.include?(' ')
rake_path = Gem.bin_path('rake')
rake_path = '"' + rake_path + '"' if rake_path.include?(' ')

cmd = ENV['rake'] || "#{Gem.ruby} -rubygems #{rake_path}" rescue 
Gem.default_exec_format % 'rake'

Error message:
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug-ide:
        ERROR: Failed to build gem native extension.

"C:/Program Files/jruby-1.5.0/bin/jruby.exe" mkrf_conf.rb

"C:/Program Files/jruby-1.5.0/bin/jruby.exe" -rubygems C:/Program 
Files/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.8.7/bi
n/rake RUBYARCHDIR="C:/Documents and Settings/Pepijn Van 
Eeckhoudt/.gem/jruby/1.8/gems/ruby-debug-ide-0.4.9/lib" RUBYLIB
DIR="C:/Documents and Settings/Pepijn Van 
Eeckhoudt/.gem/jruby/1.8/gems/ruby-debug-ide-0.4.9/lib"
Error opening script file: C:/Program (The system cannot find the file 
specified)

-- 
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