Re: [RubyInstaller] DevKit failing to build Gem native extensions

1,931 views
Skip to first unread message

Luis Lavena

unread,
Aug 4, 2011, 9:05:51 AM8/4/11
to rubyin...@googlegroups.com
On Wed, Aug 3, 2011 at 9:58 PM, JesseFair <jfa...@gmail.com> wrote:
>  Hi there
>
> I am having issues getting DevKit & Ruby192 working on my Windows XP
> machine. I had it working at one point but recently tried to run 'gem
> pristine --all' and encountered an issue with it trying to rebuild
> json. I have tried several options including deleting the autorun reg
> setting to reinstalling Ruby & DevKit with no luck.
>
> Here is my setup
>
> Ruby version: rubyinstaller-1.9.2-p290.exe
> Devit installed: DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe
>
> The steps I following to install was as follows:
>
> 1. Installed ruby 192 to c:\Ruby192 via installer
> 2. Extracted the DevKit to c:\DevKit via installer
> 3. ran c:\DevKit\ruby dk.rb init
> 4. ran c:\DevKit\ruby dk.rb install
> 5. attempted the test by running gem install rdiscount --platform=ruby
> and getting the below error
>

What are the contents of config.yml that is inside DevKit directory?

> C:\>gem install rdiscount --platform=ruby
> Temporarily enhancing PATH to include DevKit...
> Building native extensions.  This could take a while...
> ERROR:  Error installing rdiscount:
>        ERROR: Failed to build gem native extension.
>
>        C:/Ruby187/bin/ruby.exe extconf.rb
>
> Gem files will remain installed in C:/Ruby187/lib/ruby/gems/1.8/gems/
> rdiscount-1
> .6.8 for inspection.
> Results logged to C:/Ruby187/lib/ruby/gems/1.8/gems/rdiscount-1.6.8/
> ext/gem_make
> .out
>

If you're seeing this happening, you might have something that is
interfering in your system.
>
> My C:\Ruby\Ruby192\lib\ruby\site_ruby\1.9.1\rubygems\defaults
> \operating_system.rb contains:
>
> # :DK-BEG: override 'gem install' to enable RubyInstaller DevKit usage
> Gem.pre_install do |gem_installer|
>  unless gem_installer.spec.extensions.empty?
>    unless ENV['PATH'].include?('C:\\DevKit\\mingw\\bin') then
>      Gem.ui.say 'Temporarily enhancing PATH to include DevKit...' if
> Gem.configuration.verbose
>      ENV['PATH'] = 'C:\\DevKit\\bin;C:\\DevKit\\mingw\\bin;' +
> ENV['PATH']
>    end
>    ENV['RI_DEVKIT'] = 'C:\\DevKit'
>    ENV['CC'] = 'gcc'
>    ENV['CPP'] = 'cpp'
>    ENV['CXX'] = 'g++'
>  end
> end
> # :DK-END:
>
>
> REG QUERY "HKCU\Software\Microsoft\Command Processor"
>
> C:\DevKit>REG QUERY "HKCU\Software\Microsoft\Command Processor"
>
> ! REG.EXE VERSION 3.0
>
> HKEY_CURRENT_USER\Software\Microsoft\Command Processor
>    CompletionChar      REG_DWORD       0x9
>    DefaultColor        REG_DWORD       0x0
>    EnableExtensions    REG_DWORD       0x1
>
>
>
> REG QUERY "HKLM\Software\Microsoft\Command Processor"
>
> C:\DevKit>REG QUERY "HKLM\Software\Microsoft\Command Processor"
>
> ! REG.EXE VERSION 3.0
>
> HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor
>    CompletionChar      REG_DWORD       0x40
>    DefaultColor        REG_DWORD       0x0
>    EnableExtensions    REG_DWORD       0x1
>    PathCompletionChar  REG_DWORD       0x40
>
>
> C:\DevKit>CHCP
> Active code page: 437
>
> C:\DevKit>SET COMSPEC
> ComSpec=C:\Program Files\Console-1.5\Console\console.exe
>  --- this looks a little odd , shouldnt it be C:\Windows
> \system32\cmd.exe
>

Dunno why you have that as COMSPEC, but Console.exe is not a valid
command processor and could explain the reason why gem installation is
failing.

Please change your environment variables in your system settings and try again.

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Jesse Fair

unread,
Aug 4, 2011, 10:01:18 AM8/4/11
to rubyin...@googlegroups.com

Luis,

Thanks for the prompt response. I noticed the comspec mix up right after posting this msg so tried to change it to the correct settings and everything is working once again. I thought to try it from a series of troubleshooting steps you were going through with someone else with a similar issue. Thx for your help.

> --
> You received this message because you are subscribed to the Google Groups "RubyInstaller" group.
> To post to this group, send email to rubyin...@googlegroups.com.
> To unsubscribe from this group, send email to rubyinstalle...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyinstaller?hl=en.
>

> --
> You received this message because you are subscribed to the Google Groups "RubyInstaller" group.
> To post to this group, send email to rubyin...@googlegroups.com.
> To unsubscribe from this group, send email to rubyinstalle...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyinstaller?hl=en.
>

Luis Lavena

unread,
Aug 5, 2011, 10:47:22 AM8/5/11
to rubyin...@googlegroups.com
On Thu, Aug 4, 2011 at 11:01 AM, Jesse Fair <jfa...@gmail.com> wrote:
> Luis,
>
> Thanks for the prompt response. I noticed the comspec mix up right after
> posting this msg so tried to change it to the correct settings and
> everything is working once again. I thought to try it from a series of
> troubleshooting steps you were going through with someone else with a
> similar issue. Thx for your help.
>

Great to hear this, updated the Wiki for the new corner case:

https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-gems_fails_comspec_autorun

Reply all
Reply to author
Forward
0 new messages