Install Error rjb gem

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.

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

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

I got around this issue by manually installing rjb 1.1.2:

gem install rjb -v 1.1.2

then

gem install buildr --ignore-dependencies

On Mon, May 12, 2008 at 10:38 AM, Shane Witbeck

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A: Because it makes it difficult to follow the conversation.
Q: Why is top posting bad?

I’ve fixed the quote, too:

Shane Witbeck wrote:

|> On Thu, May 1, 2008 at 1:10 AM, Phillip G.
|> [email protected] wrote:

|> 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:
|>

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

Build Ruby with MinGW32, following the recipe posted by Luis[0]. You’ll
have to build all native gems, however, and hunt for header files, etc.
if they are required.

If you want to compile a a C extension, you need a C compiler. The
easiest way to get that up and running, is by using the installer3
recipe. Especially since Visual C++ and MinGW32 are not binary
compatible, and you need a way to maintain that, too.

In short: No, unless you can find a Copy of Visual C++ 6.0. Good luck
with that, though.

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

High priority for whom? And it doesn’t prevent the install, it just
means it isn’t an easy install, that is done by just typing one
command, but instead means to read a bit of documentation on how to get
up and running.

And I’ve just tested this: jruby -S gem install Buildr is successful.

Just like the documentation mentioned.

[0]
http://groups.google.com/group/comp.lang.ruby/browse_frm/thread/1e2f1b9a3d611e3b?tvc=1


Phillip G.
Twitter: twitter.com/cynicalryan
Blog: http://justarubyist.blogspot.com

Whoso findeth a wife findeth a good thing.
~ – Old Testament
~ – Proverbs xviii, 22
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgoXN8ACgkQbtAgaoJTgL/iuwCfWSGwD9UGvINszKduUmnnaPUB
XJsAn2/27aq0pBideEnL87aMUVFn0THI
=CIi4
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A: Because it makes it difficult to follow the conversation.
Q: Why is top posting bad?

Shane Witbeck wrote:
| In my opinion an easy install is the highest priority for
| anyone…especially if you expect a high adoption rate from an
| incubator project.

Installing a build system for Java applications on a non-Java Ruby.
Hmmmm…

You know, I’d use JRuby for that. You know, it being Java and all.

You could also submit a bug to BuildR, as their Windows instructions
seem outdated (gem install will select a gem automagically, and their
gemspec seems to be buggered).

| If there needs to be special install instructions, new users shouldn’t
| have to hunt for them.

http://incubator.apache.org/buildr/getting_started.html

Yeah, it requires the tracking skills of an Allan Quartermain to find
the instructions, indeed.


Phillip G.
Twitter: twitter.com/cynicalryan
Blog: http://justarubyist.blogspot.com

Avoid multiple exits from loops.
~ - The Elements of Programming Style (Kernighan & Plaugher)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgobAQACgkQbtAgaoJTgL8v+ACdE0YQnBcjD1SyRuD1ZGL9LeB5
x/YAoJqiW1OVyVf9nSDZ+YBpGHofTEhn
=cbOX
-----END PGP SIGNATURE-----

In my opinion an easy install is the highest priority for
anyone…especially if you expect a high adoption rate from an
incubator project.

If there needs to be special install instructions, new users shouldn’t
have to hunt for them.

On Mon, May 12, 2008 at 11:05 AM, Phillip G.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs