Rmagic isn't work on Rails3 - ruby

My Rmagic isn't work
ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]
rails -v
Rails 3.0.0.beta4
irb
require rubygems
true
require rmagick
true
but , I put the fllow code:
gem 'rmagick', :require => false
it error:
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... no
checking for sys/types.h... no
checking for wand/MagickWand.h... no
Can't install RMagick 2.13.1. Can't find MagickWand.h.
*** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby/bin/ruby
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `each'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `build_extensions'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:198:in `install'
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/source.rb:100:in `install'
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/installer.rb:55:in `run'
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_set.rb:12:in `each'
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/spec_set.rb:12:in `each'
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/installer.rb:44:in `run'
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/installer.rb:8:in `install'
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/cli.rb:217:in `install'
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/task.rb:22:in `send'
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/task.rb:22:in `run'
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/invocation.rb:118:in `invoke
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor.rb:246:in `dispatch'
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/vendor/thor/base.rb:389:in `start'
from C:/Ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/bin/bundle:13
from C:/Ruby/bin/bundle:19:in `load'
from C:/Ruby/bin/bundle:19
please help me , thanks !

MagickWand.h is part of ImageMagick and the RMagick installer can't find it. It appears that you need to install ImageMagick on your system or if you have it installed you need to add the libraries to a path that the gem installer can see. RMagick will not work without ImageMagick or GraphicsMagick installed on your system.
UPDATED ANSWER
Since you are using windows you will need to download the gem manually and install it. The installation FAQ says:
Use the rmagick-win32 gem. This gem is bundled with a a copy of the ImageMagick Windows installer so you don't need to download your own copy. Download the rmagick-win32 gem from the RMagick project page on RubyForge, unzip it into a temporary directory, and follow the instructions in the README.html file you'll find in the package.
http://rubyforge.org/projects/rmagick/
I am thinking that you probably want to uninstall the imagemagick version that you already installed, in case there are any conflicts. After you install the gem manually, you should be able to put it in your Gemfile and bundle install. Having not used rmagick on windows, I am not sure if you reference the gem as "rmagick" or "rmagick-win32". After you install the gem manually, you can probably figure that out by running the "gem list" command. See which one shows up and put that in your Gemfile, so it can find the installed version.. Bundler will use this gem instead of trying to install a new one.

This code should do the trick...
require 'RMagick' not require 'rmagick'

Related

Can't install a gem on CentOS 8

Use root user installed rubygems.
# yum install rubygems -y
When check ruby's version, got
# ruby -v
ruby 2.5.9p229 (2021-04-05 revision 67939) [x86_64-linux]
Gem's version:
# gem -v
2.7.6.3
When install a gem, got
# gem install fluent-plugin-kinesis
Building native extensions. This could take a while...
ERROR: Error installing fluent-plugin-kinesis:
ERROR: Failed to build gem native extension.
current directory: /usr/local/share/gems/gems/msgpack-1.4.2/ext/msgpack
/usr/bin/ruby -r ./siteconf20210825-20925-17fyw57.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /usr/local/share/gems/gems/msgpack-1.4.2 for inspection.
Results logged to /usr/local/lib64/gems/ruby/msgpack-1.4.2/gem_make.out
Should I install a high version ruby? It's the default one on the system.
update
I installed ruby-devel
# yum install ruby-devel.x86_64
Run install fluent-plugin-kinesis gem again
# gem install fluent-plugin-kinesis
Building native extensions. This could take a while...
ERROR: Error installing fluent-plugin-kinesis:
ERROR: Failed to build gem native extension.
current directory: /usr/local/share/gems/gems/msgpack-1.4.2/ext/msgpack
/usr/bin/ruby -r ./siteconf20210826-11878-18i9eps.rb extconf.rb
checking for ruby/st.h... *** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)
/usr/share/ruby/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/share/ruby/mkmf.rb:590:in `try_cpp'
from /usr/share/ruby/mkmf.rb:1098:in `block in have_header'
from /usr/share/ruby/mkmf.rb:948:in `block in checking_for'
from /usr/share/ruby/mkmf.rb:350:in `block (2 levels) in postpone'
from /usr/share/ruby/mkmf.rb:320:in `open'
from /usr/share/ruby/mkmf.rb:350:in `block in postpone'
from /usr/share/ruby/mkmf.rb:320:in `open'
from /usr/share/ruby/mkmf.rb:346:in `postpone'
from /usr/share/ruby/mkmf.rb:947:in `checking_for'
from /usr/share/ruby/mkmf.rb:1097:in `have_header'
from extconf.rb:3:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/lib64/gems/ruby/msgpack-1.4.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/local/share/gems/gems/msgpack-1.4.2 for inspection.
Results logged to /usr/local/lib64/gems/ruby/msgpack-1.4.2/gem_make.out
For other gems works well.
Take a look at the docs or this answer.
Install Ruby >= 2.4 on your local environment. In addition, install ruby-dev package via Package Manager to build native extension gems.
I believe in CentOS ruby-dev equivalent is ruby-devel. You can confirm it by running yum search ruby-dev
You'll find 2 packages, one i686 and another x86_64. You can find which one you need by running lscpu | grep Arch.
Then simply download the package, and rerun gem install

Can't Find ffi.h When Installing ffi ruby gem

Ruby version 2.2.4p230
RubyGem version 2.7.2
Ruby-devel and lib64ffi-devel installed.
64-bit OpenMandriva 3.0, urpmi and rpmdrake used.
Goal: to install compass, but the gem ffi is needed first.
I have scoured the internet so hard for the last two days and I'm so stumped... It's impossible for me to install an earlier version of ruby because of the dependency for an older ncurses. I feel like replacing ncurses would open a can of nasty worms.
However... I am also completely open to a compass alternative, where the config.rb project files could be somehow ported / copied so both compass and this other sass compiler could operate. (this is for work and we're not changing the sass builder any time soon).
/usr/share/gems/gems/ffi-1.9.18/ext/ffi_c totally exists, there is an ffi.c file in that directory but can't find any ffi.h file in the vicinity. In a moment of desperation I touched ffi.h in that dir and when I ran gem install it removed it. ;) I would try taking a copy of someone else's libs to see if that works.
Basically any way to get this working without breaking the rest of my packages. I don't use ruby for anything else, just compass.
Here is the output:
# sudo gem install ffi
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
current directory: /usr/share/gems/gems/ffi-1.9.18/ext/ffi_c
/usr/bin/ruby -r ./siteconf20171110-17988-1lodsok.rb extconf.rb
checking for ffi.h... *** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib64
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/usr/share/ruby/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/share/ruby/mkmf.rb:587:in `try_cpp'
from /usr/share/ruby/mkmf.rb:1060:in `block in have_header'
from /usr/share/ruby/mkmf.rb:911:in `block in checking_for'
from /usr/share/ruby/mkmf.rb:351:in `block (2 levels) in postpone'
from /usr/share/ruby/mkmf.rb:321:in `open'
from /usr/share/ruby/mkmf.rb:351:in `block in postpone'
from /usr/share/ruby/mkmf.rb:321:in `open'
from /usr/share/ruby/mkmf.rb:347:in `postpone'
from /usr/share/ruby/mkmf.rb:910:in `checking_for'
from /usr/share/ruby/mkmf.rb:1059:in `have_header'
from extconf.rb:16:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/lib64/gems/ruby/ffi-1.9.18/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/share/gems/gems/ffi-1.9.18 for inspection.
Results logged to /usr/lib64/gems/ruby/ffi-1.9.18/gem_make.out
Any help appreciated!
Your error message shows:
/usr/share/ruby/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
And that's how you can solve it:
xcode-select --install
(but make sure beforehand that xcode-select -p is returning the path to a stable Xcode version, like Xcode 10)
See also https://github.com/ffi/ffi/issues/647.

rmagick under windows

I just wanted to install rmagick under windows.
So I installed ImageMagick with C/C++ header, but that seems no more to be necessary.
Then I installed the Ruby Build Tools
ruby dk.rb init
ruby dk.rb install
Then I wanted to install the rmagick gem with gem install rmagick.
But I get this error:
H:\Downloads\ruby build tools>gem install rmagick
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
C:/Ruby192/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... *** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby192/bin/ruby
C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate
an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:452:in `try_cpp'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:834:in `block in have_header'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:833:in `have_header'
from extconf.rb:193:in `<main>'
Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1
for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
Before I installed the Build Tools, I just got the advice to install them.
Now they are installed and I get a different error message than before (see above).
It still wants me to install the Build Tools, so its installation might be broken?
I get the same error with linecache... also something with the mkmf file and build tools.
I guess this is a common error.
I had to install Ruby on Rails first, and then from the Command Prompt with Ruby and Rails, I ran:
gem install rmagick --platform=ruby -- --with-opt-dir=C:\ImageMagick
It all worked, and I saw this:
Fetching: rmagick-2.13.2.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed rmagick-2.13.2
1 gem installed
Installing ri documentation for rmagick-2.13.2...
Installing RDoc documentation for rmagick-2.13.2...
Windows 7 64bit, but installed the 32-bit version of ImageMagick to C:\ImageMagick
I installed ImageMagick and RMagick on Windows Vista in a Rails environment this way:
First I downloaded ImageMagick-6.6.7-Q16 from http://www.imagemagick.org/download/binaries/ and installed it in "C:\ImageMagick-6.6.7-Q16" folder.
Then I downloaded RMagick from https://github.com/rmagick/rmagick/zipball/master and extracted it into "C:\RailsInstaller\Ruby1.9.2\lib\ruby\gems\1.9.1\bundler\gems\rmagick-rmagick\" folder (which is my ruby bundler gems folder).
Then I simply called
'gem install rmagick'
from my prompt and it all worked fine.
Now I can call from a Rails app Gemfile
gem "rmagick"
And then 'bundle install' works fine.
PS: please note that I first installed Rails with http://www.railsinstaller.org.
Include the head files & lib files to your System Environment first:
set CPATH=C:/Progra~2/ImageMagick-6.7.0-Q16/include
set LIBRARY_PATH=C:/Progra~2/ImageMagick-6.7.0-Q16/lib
Them, gem install ** will be done.
~.~
I got also the same error checking for stdint.h...
The problem was that I've installed ImageMagick on C:\Program Files (x86)\ImageMagick which contains spaces. So I deinstall ImageMagick and installed again to C:\Ruby19\ImageMagick.
Here is what I've done (Ruby 1.9.3, mingw32)
Download ImageMagick-6.7.7-9-Q8-windows-dll.exe (the newest version of ImageMagick seems to be incompatible with rmagick)
Install to C:\Ruby19\ImageMagick. The path must not contain spaces!
Set install configuration to
Add application direcotry to your system path
Install development headers and libraries for C and C++
gem install rmagick --platform=ruby -- --with-opt-dir=C:\Ruby19\ImageMagick
I installed RMagick using these instructions. Note that it calls for Ruby 1.9.1, but works (for me anyway) on 1.9.2 (i386-mingw32). I recommend uninstalling/reinstalling ImageMagick using the version specified in the instructions.
If possible try replacing RMagick with Mini_Magick, it aims to do the same thing but a different way. I had no luck with RMagick but Mini_Magick installed in the bundle

Ruby gem mysql2 install error

I have the Ruby version ruby 1.9.2p0 (2010-08-18) [i386-mingw32] installed in Windows7.
and the gem vesion 1.3.7
When i tried to install mysql gem, it is showing Failed to build gem native extension error, why is this? my mysql version is 5.1.36(WampServer)
E:\RubyApps\test_app2>gem install mysql2
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
E:/Ruby192/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... *** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=E:/Ruby192/bin/ruby
E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to genera
te an executable file. (RuntimeError)
You have to install development tools first.
from E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:435:in `try_link0'
from E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:440:in `try_link'
from E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:552:in `try_func'
from E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:797:in `block in have_func'
from E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
from E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postp
one'
from E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from E:/Ruby192/lib/ruby/1.9.1/mkmf.rb:796:in `have_func'
from extconf.rb:9:in `<main>'
Gem files will remain installed in E:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.
2.3 for inspection.
Results logged to E:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.3/ext/mysql2/ge
m_make.out
E:\RubyApps\test_app2>
If you are having this same problem in Linux, basically you just need to install a few libraries first. This worked for me.
> sudo apt-get install libmysql-ruby libmysqlclient-dev
> gem install mysql
source: http://heatware.net/ruby-rails/solved-installing-mysql-gem-extconf-rb-failed-error/
Since this keeps coming up on google as on of the top results, I should point out that this answers is from almost 2 years ago. Here is a more updated answer: How to use "mysql2" gem in Rails 3 application on Windows 7?
According to the developer there is a already a reported bug for it and he is working on parting mysql2 over to Windows. As of now - it's still in the works. Use the older mysql driver for now - or use sqlite for local development.
This is from the googlegroups discussion
Blockquote
Hey Erwann,
There's a ticket on the mysql2 issue tracker for Win32 support already
at http://github.com/brianmario/mysql2/issues#issue/8 . You can follow
it for progress; I'm doing my best to get things working smoothly for
you guys. Hang tight! :)
Just for the record: The problem should be solved!
The mysql2 gem v.0.2.6 is out, having win32 support.
gem install mysql2 worked without problems now.
See: http://github.com/brianmario/mysql2/issues/issue/8#issue/8/comment/479748
it works,
c:> gem install mysql2 -- '--with-mysql-lib="C:\Prog
ram Files\MySQL\MySQL Connector C 6.0.2\lib\opt" --with-mysql-include="C:\Progra
m Files\MySQL\MySQL Connector C 6.0.2\include"'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed mysql2-0.3.6
1 gem installed
Installing ri documentation for mysql2-0.3.6...
Enclosing class/module 'mMysql2' for class Client not known
Installing RDoc documentation for mysql2-0.3.6...
Enclosing class/module 'mMysql2' for class Client not known
Note:
I. If there is no lib and include directory in your mysql then install mysql connector c
II. First install DevKit then only you can install mysql2 plugin in windows
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
You can try
gem install mysql2 -v '0.0.00' -- --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include
Have you installed the DevKit correctly? If doubt, cross check the steps of installation on -
http://rorguide.blogspot.com/2011/03/installing-mysql2-gem-on-ruby-192-and.html
I was able to install mysql2 gem after following these steps.
Under Cygwin, I had to be sure to install not just libmysqlclient18, but also libmysqlclient-devel. Then "gem install mysql2" went fine.
There is also, of course, a ruby-mysql2 package in Cygwin.
key: the line that says You have to install development tools first.
ref: devkit
use
gem install mysql
for windows, till mysql2 get it right.

Installing Hpricot on Ruby 1.9.1 on Windows

I am trying to install hpricot using the command:
>gem install hpricot -v 0.8.2
Building native extensions. This could take a while...
ERROR: Error installing hpricot:
ERROR: Failed to build gem native extension.
C:/Ruby19/bin/ruby.exe extconf.rb
checking for stdio.h... * 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby19/bin/ruby
C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:362:in try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:431:intry_cpp'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:809:in block in have_header'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:668:inblock in checking_for'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:274:in block (2 levels) in postpone'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:248:inopen'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:274:in block in postpone'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:248:inopen'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:270:in postpone'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:667:inchecking_for'
from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:808:in have_header'
from extconf.rb:2:in'
Gem files will remain installed in C:/Ruby19/lib/ruby/gems/1.9.1/gems/hpricot-0.8.2 for inspection.
Results logged to C:/Ruby19/lib/ruby/gems/1.9.1/gems/hpricot-0.8.2/ext/fast_xs/gem_make.out
it mentions I need to install "development tools" but I have no idea what that refers to. Any suggestions?
Try:
gem install hpricot --platform=mswin32
Install the devkit at rubyinstaller.org/downloads
Execute below command and it works:
gem install hpricot --platform=mswin32
An additional note that others may find useful, from my recent attempt to install on Windows using the Ruby devkit:
To install the devkit, you extract the bin and devkit directories to your Ruby directory which will place a few files in your Ruby bin and a devkit directory in your Ruby directory. Then, per the instructions, you set the proper location for mingw in the fstab file.
In my case, some gems, namely Hpricot and Ruby-Debug19, would not install on my system even with the devkit installed properly because of an error creating the makefile. I ended up installing the latest version of mingw separately from SourceForge, then changed the fstab file within the "ruby19/devkit/msys/1.0.11/etc" directory to point to the directory where I installed mingw. Both gems then installed correctly.
Execute the following command:
gem install hpricot

Resources