I have tried installing RJB but I keep getting this error :
–
C:\ruby\letter4sure>gem install rjb
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.
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
–srcdir=.
–curdir
–ruby=c:/ruby/bin/ruby
Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/rjb-1.1.3 for inspection.
Results logged to
c:/ruby/lib/ruby/gems/1.8/gems/rjb-1.1.3/ext/gem_make.out
–
There is an mkmf.log file under
C:\ruby\lib\ruby\gems\1.8\gems\rjb-1.1.3\ext that says :
have_header: checking for jni.h… -------------------- no
“cl -nologo -E -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I. -IC:\Program
Files\Java\jdk1.6.0_06\include -IC:\Program
Files\Java\jdk1.6.0_06\include\win32 -MD -Zi -O2b2xg- -G6 -IC:\Program
Files\Java\jdk1.6.0_06\include -IC:\Program
Files\Java\jdk1.6.0_06\include\win32 /W3 conftest.c -P”
checked program was:
/* begin /
1: #include <jni.h>
/ end */
Problem is JAVA_HOME is installed and this is what it says :
C:\ruby\letter4sure>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_06
When I walk through extraconf.rb I see that it can see jni.h so what is
wrong here?
On Fri, 2008-07-04 at 00:24 +0200, Ather S. wrote:
checking for jni.h… no
–with-opt-lib
c:/ruby/lib/ruby/gems/1.8/gems/rjb-1.1.3/ext/gem_make.out
Files\Java\jdk1.6.0_06\include -IC:\Program
Problem is JAVA_HOME is installed and this is what it says :
C:\ruby\letter4sure>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_06
When I walk through extraconf.rb I see that it can see jni.h so what is
wrong here?
do you have administrator permissions?
sounds like you can find the error here…
c:/ruby/lib/ruby/gems/1.8/gems/rjb-1.1.3/ext/gem_make.out
Craig
Craig W. wrote:
On Fri, 2008-07-04 at 00:24 +0200, Ather S. wrote:
checking for jni.h… no
–with-opt-lib
c:/ruby/lib/ruby/gems/1.8/gems/rjb-1.1.3/ext/gem_make.out
Files\Java\jdk1.6.0_06\include -IC:\Program
Problem is JAVA_HOME is installed and this is what it says :
C:\ruby\letter4sure>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_06
When I walk through extraconf.rb I see that it can see jni.h so what is
wrong here?
do you have administrator permissions?
sounds like you can find the error here…
c:/ruby/lib/ruby/gems/1.8/gems/rjb-1.1.3/ext/gem_make.out
Craig
I do have admin permissions this is what I found in gem_make.out ;
c:/ruby/bin/ruby.exe extconf.rb install rjb-1.1.3.gem
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.
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
–srcdir=.
–curdir
–ruby=c:/ruby/bin/ruby
–
Also I stepped through extraconf.rb by renaming it and putting put
statements in it and it can access the jni.h file in the jdk but
apparently its failing jni.h check here…
On Fri, 2008-07-04 at 00:45 +0200, Ather S. wrote:
C:\Program Files\Java\jdk1.6.0_06
Craig
–ruby=c:/ruby/bin/ruby
–
Also I stepped through extraconf.rb by renaming it and putting put
statements in it and it can access the jni.h file in the jdk but
apparently its failing jni.h check here…
jni.h should be located in
C:\Program Files\Java\jdk1.6.0_06\include
Is your java installation good?
Craig
Yes it is a good installation.
I also installed jdk 1.5 and jni.h is indeed located there.
Craig W. wrote:
On Fri, 2008-07-04 at 00:45 +0200, Ather S. wrote:
C:\Program Files\Java\jdk1.6.0_06
Craig
–ruby=c:/ruby/bin/ruby
–
Also I stepped through extraconf.rb by renaming it and putting put
statements in it and it can access the jni.h file in the jdk but
apparently its failing jni.h check here…
jni.h should be located in
C:\Program Files\Java\jdk1.6.0_06\include
Is your java installation good?
Craig
On Fri, 2008-07-04 at 03:49 +0200, Ather S. wrote:
–ruby=c:/ruby/bin/ruby
Is your java installation good?
I’m more of a Linux guy - especially when it pertains to java
You might try setting JAVA_HOME environmental variable to short name,
per
http://rubyforge.org/forum/forum.php?thread_id=18875&forum_id=8190
perhaps you want to check with the rubyforge/rjb packagers…where they
have forums and mail lists. It should just work.
http://rubyforge.org/projects/rjb/
Craig
I managed to install it will write up all the measures I had to take to
get it to working …
Ather S. wrote:
That is precisely what I have been using along with the readme file in
rjb.
Craig W. wrote:
This might be useful…
http://arton.no-ip.info/collabo/backyard/?HowToBuildRjb
Craig
BTW I figured out how to install this gem ; this opens a whole new
world (hopefully!)
I will write up the issues I encountered and post them on some blog to
help out the others.
On Jul 3, 11:17 pm, Ather S. [email protected]
If anyone is still getting this error even after…
→ having JDK installed
→ Ruby installed and
→ gem install rjb throws error saying
checking for jni.h…no
open http://rubyforge.org/projects/rjb/ and check the version which
doesn’t say (source gem only).
Now on command prompt do
gem install rjb -v version_number
This will install the gem.
That is precisely what I have been using along with the readme file in
rjb.
Craig W. wrote:
This might be useful…
http://arton.no-ip.info/collabo/backyard/?HowToBuildRjb
Craig