tags:

views:

2844

answers:

6
+4  A: 

Install the devkit at rubyinstaller.org/downloads

Marcus
A: 

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

dh
+20  A: 

Try: gem install (gemname) --platform=mswin32

freek
Worked great for me, and I was worried I was in for a world of hurt. Now trying to get libxml to work!
Eric Pugh
I was having the same problem, and this being the first solution that I tried; worked like a charm! I love stack overflow. Thanks for the great answer freek!However, for my own curiosity, does mswin32 means 32-bit windows? If I have 64 bit 7 pro, should I (next time) type mswin64? Sorry, just curious.
John
this did it for me too. thanks.
Gaia
A: 

Execute Below command and its works

gem install hpricot --platform=mswin32

Amit
A: 

Thanks freek and Amit - that did the trick.

SethRocker
A: 

Hmm... After doing a "bundle install", I did:

gem install hpricot --platform=mswin32

It says it installed the gem successfully, but now when I try and run rake I get:

Could not find gem 'hpricot (>= 0, runtime)' in any of the gem sources. Try running bundle install.

Devkit installed too...

Peter