I'm running into the same issue. Are there any other better
suggestions for a workaround?

It seems this should be a pretty high priority since it prevents an
install of buildr on windows machines.

Thanks,
Shane


On Thu, May 1, 2008 at 1:10 AM, Phillip Gawlowski
<cmdjackryan / googlemail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> BWACJay wrote:
> | I've spent two good(bad, actually) days on this already, and searched
> | through all the archives and anywhere else that the Google might take
> | me...
> |
> | I'm simply trying to install the rjb gem using "gem install rjb". I
> | get this response:
> | ------
> | Building native extensions.  This could take a while...
> | ERROR:  Error installing rjb:
> |       ERROR: Failed to build gem native extension.
> |
> | c:/ruby/bin/ruby.exe extconf.rb install rjb
> | checking for jni.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.
> | ...
> | ------
> |
> | I've seen posts about this exact problem, but none of the solutions
> | work for me (or I'm not executing them correctly, but I've gone
> | through them all at least 10 times so far).  The proposed solutions
> | that I've seen are:
> | 1) make sure path environment variable includes JDK root directory.
> | My path variable includes the JDK root directory, the /bin directory,
> | and the /include directory (I've tried each individually as well)
> | 2) the JAVA_HOME environment variable not set.  My command "c:\>echo
> | %JAVA_HOME%" returns "C:\j2sdk1.4.2_17"
> | 3) copy the jni.h (and a few other) files to the rjb-1.1.3/ext folder,
> | which I have done.
> | 4) run a specific version of the install gem.  I've tried the default
> | 'gem install rjb' as well as 'gem install -platform mswin32' (even
> | tried 'gem install -platform ruby') and no progress.
> |
> | Here is some other helpful? info:
> | OS = WinXP SP2
> | Ruby = ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
> | Rails = Rails 2.0.2
> | Java SDK = J2SE 1.4.2_17
> | RJB = 1.1.3
> |
> | Any direction would be greatly appreciated.
>
> Well, unless you have Visual C++ 6.0 installed, you won't be able to
> compile C extensions.
>
> One option would be to use the (highly experimental) Windows installer3
> recipe, which downloads all you need to compile Ruby (including the
> MinGW32 GCC compiler), compiles Ruby, and puts it into a sandbox, so
> that you current installation doesn't get mixed up. With any luck, you
> should be able to just do a 'gem install rjb' in the compiled Ruby's bin
> directory, and the gem should install successfully.
>
> A quick and dirty guide to getting the installer3 recipe:
> <http://groups.google.com/group/comp.lang.ruby/browse_frm/thread/1e2f1b9a3d611e3b?tvc=1>
>
> - --
> Phillip Gawlowski
> Twitter: twitter.com/cynicalryan
> Blog: http://justarubyist.blogspot.com
>
> Dulce bellum inexpertis.
> (War is sweet to those who do not fight.)
> ~ -- Gerard Didier Erasmus (c. 1465-1536)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.8 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkgZUN4ACgkQbtAgaoJTgL+uRACdFt8DTgejLvwH6a4pZJOovXFG
> AWUAoJpDGBLfHbcetZ0QCJP+NqcdJG4W
> =mpGg
> -----END PGP SIGNATURE-----
>
>



-- 
-Shane