Installing amazon-ecs/hpricot RubyGem on Windows Operating System
Installing rubygems that come with native extensions is not same on gnu/linux and Windows platforms as I have discovered recently. Apparently, it is important that the native extensions needed by the rubygem be built with the same compiler tool chain as your main ruby installation. The rubygem I needed to install was amazon-ecs and it depends on another rubygem called hpricot which comes with native extensions. Though hpricot installed fine on gnu/linux OS, I recieved the following errors on Windows:
Bulk updating Gem source index for: http://gems.rubyforge.org/
Building native extensions. This could take a while…
ERROR: Error installing hpricot:
ERROR: Failed to build gem native extension.
c:/ruby/bin/ruby.exe extconf.rb install hpricot
checking for stdio.h… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.6.161 for inspection.
Results logged to c:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.6.161/ext/fast_xs/gem_make.out
C:\Users\tabrez>
Help on the IRC channel and some searching on the Internet provided me with the following solution: use whytheluckystiff’s repository as the source to install hpricot rubygem. Once hpricot rubygem was installed, amazon-ecs rubygem installed with no problems.
Successfully installed hpricot-0.6-x86-mswin32
1 gem installed
Installing ri documentation for hpricot-0.6-x86-mswin32…
Installing RDoc documentation for hpricot-0.6-x86-mswin32…
C:\Users\tabrez> gem install amazon-ecs
Successfully installed amazon-ecs-0.5.3
1 gem installed
Installing ri documentation for amazon-ecs-0.5.3…
Installing RDoc documentation for amazon-ecs-0.5.3…
C:\Users\tabrez>
The same source works for sandbox rubygem too.
References:
Related Posts:
Readers who viewed this page, also viewed:
- Maemo SDK VMWare Appliance 0.4 Released With Lot of Goodies
- Installing Sun Java SE 6, Apache Maven 2 and Tomcat 5.5 on Windows OS
- Why I Use iPod as a USB Storage Device
- Creating “Hello World” Web Application Using the Grails Framework
- Linux Bible 2007 Edition: Install/Run 10+ GNU/Linux Distributions(Ubuntu, Fedora, Gentoo etc)