We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Ruby gem install on windows 7

Hello, im trying to install OCR gem, bay I get an error message (listing at the bottom), ruby version 2.1.0.<div>what i can to do?<br><div><br></div><div><div>$ gem install asposeocrjava </div><div>Temporarily enhancing PATH to include DevKit... </div><div>Building native extensions. This could take a while... </div><div>ERROR: Error installing asposeocrjava: </div><div> ERROR: Failed to build gem native extension. </div><div> </div><div> C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe extconf.rb </div><div>checking for jni.h... no </div><div>*** extconf.rb failed *** </div><div>Could not create Makefile due to some reason, probably lack of necessary </div><div>libraries and/or headers. Check the mkmf.log file for more details. You may </div><div>need configuration options. </div><div> </div><div>Provided configuration options: </div><div> --with-opt-dir </div><div> --without-opt-dir </div><div> --with-opt-include </div><div> --without-opt-include=${opt-dir}/include </div><div> --with-opt-lib </div><div> --without-opt-lib=${opt-dir}/lib </div><div> --with-make-prog </div><div> --without-make-prog </div><div> --srcdir=. </div><div> --curdir </div><div> --ruby=C:/RailsInstaller/Ruby2.1.0/bin/ruby </div><div>extconf.rb:67:increate_rjb_makefile’: no jni.h in -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir) -

I"c:\program files\java\jre1.8.0_20\include" (RuntimeError)
from extconf.rb:77:in `’
extconf failed, exit code 1
Gem files will remain installed in C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rjb-1.5.3 for inspection.
Results logged to C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/rjb-1.5.3/gem_make.out

Hi Mik,

We have tested the gem at our end and there is no issue. Looks to be some issue with your environment. You can follow the guidelines from http://stackoverflow.com/questions/19583849/temporarily-enhancing-path-to-include-devkit-message-during-rails-installation-o to resolve this issue.

Best Regards,

I made clean installation of ruby v 2.1.7 x64 vs DevKit on windows7. and then i tryed to install Aspose OCR on rails.
Same problem.
You can see the logs


root@PC /d/projects/r1
$ gem install asposeocrjava
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing asposeocrjava:
ERROR: Failed to build gem native extension.

C:/Ruby21-x64/bin/ruby.exe extconf.rb
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
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby21-x64/bin/ruby
extconf.rb:67:in `create_rjb_makefile': no jni.h in -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir) -I"c:\program files\java\jre1.8.0_20\include" (RuntimeError)
from extconf.rb:77:in `'

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rjb-1.5.3 for inspection.
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0/rjb-1.5.3/gem_make.out

root@PC /d/projects/r1
$ gem install rails
Fetching: minitest-5.8.2.gem (100%)
Successfully installed minitest-5.8.2
Fetching: activesupport-4.2.4.gem (100%)
Successfully installed activesupport-4.2.4
Fetching: rails-deprecated_sanitizer-1.0.3.gem (100%)
Successfully installed rails-deprecated_sanitizer-1.0.3
Fetching: rails-dom-testing-1.0.7.gem (100%)
Successfully installed rails-dom-testing-1.0.7
Fetching: crass-1.0.2.gem (100%)
Successfully installed crass-1.0.2
Fetching: loofah-2.1.0.rc1.gem (100%)
Successfully installed loofah-2.1.0.rc1
Fetching: rails-html-sanitizer-1.0.2.gem (100%)
Successfully installed rails-html-sanitizer-1.0.2
Fetching: erubis-2.7.0.gem (100%)
Successfully installed erubis-2.7.0
Fetching: builder-3.2.2.gem (100%)
Successfully installed builder-3.2.2
Fetching: actionview-4.2.4.gem (100%)
Successfully installed actionview-4.2.4
Fetching: rack-1.6.4.gem (100%)
Successfully installed rack-1.6.4
Fetching: actionpack-4.2.4.gem (100%)
Successfully installed actionpack-4.2.4
Fetching: activemodel-4.2.4.gem (100%)
Successfully installed activemodel-4.2.4
Fetching: arel-6.0.3.gem (100%)
Successfully installed arel-6.0.3
Fetching: activerecord-4.2.4.gem (100%)
Successfully installed activerecord-4.2.4
Fetching: mime-types-2.6.2.gem (100%)
Successfully installed mime-types-2.6.2
Fetching: mail-2.6.3.gem (100%)
Successfully installed mail-2.6.3
Fetching: globalid-0.3.6.gem (100%)
Successfully installed globalid-0.3.6
Fetching: activejob-4.2.4.gem (100%)
Successfully installed activejob-4.2.4
Fetching: actionmailer-4.2.4.gem (100%)
Successfully installed actionmailer-4.2.4
Fetching: thor-0.19.1.gem (100%)
Successfully installed thor-0.19.1
Fetching: railties-4.2.4.gem (100%)
Successfully installed railties-4.2.4
Fetching: sprockets-3.4.0.gem (100%)
Successfully installed sprockets-3.4.0
Fetching: sprockets-rails-3.0.0.beta2.gem (100%)
Successfully installed sprockets-rails-3.0.0.beta2
Fetching: rails-4.2.4.gem (100%)
Successfully installed rails-4.2.4
Parsing documentation for actionmailer-4.2.4
Installing ri documentation for actionmailer-4.2.4
Parsing documentation for actionpack-4.2.4
Installing ri documentation for actionpack-4.2.4
Parsing documentation for actionview-4.2.4
Installing ri documentation for actionview-4.2.4
Parsing documentation for activejob-4.2.4
Installing ri documentation for activejob-4.2.4
Parsing documentation for activemodel-4.2.4
Installing ri documentation for activemodel-4.2.4
Parsing documentation for activerecord-4.2.4
Installing ri documentation for activerecord-4.2.4
Parsing documentation for activesupport-4.2.4
Installing ri documentation for activesupport-4.2.4
Parsing documentation for arel-6.0.3
Installing ri documentation for arel-6.0.3
Parsing documentation for builder-3.2.2
Installing ri documentation for builder-3.2.2
Parsing documentation for crass-1.0.2
Installing ri documentation for crass-1.0.2
Parsing documentation for erubis-2.7.0
Installing ri documentation for erubis-2.7.0
Parsing documentation for globalid-0.3.6
Installing ri documentation for globalid-0.3.6
Parsing documentation for loofah-2.1.0.rc1
Installing ri documentation for loofah-2.1.0.rc1
Parsing documentation for mail-2.6.3
Installing ri documentation for mail-2.6.3
Parsing documentation for mime-types-2.6.2
Installing ri documentation for mime-types-2.6.2
Parsing documentation for minitest-5.8.2
Installing ri documentation for minitest-5.8.2
Parsing documentation for rack-1.6.4
Installing ri documentation for rack-1.6.4
Parsing documentation for rails-4.2.4
Installing ri documentation for rails-4.2.4
Parsing documentation for rails-deprecated_sanitizer-1.0.3
Installing ri documentation for rails-deprecated_sanitizer-1.0.3
Parsing documentation for rails-dom-testing-1.0.7
Installing ri documentation for rails-dom-testing-1.0.7
Parsing documentation for rails-html-sanitizer-1.0.2
Installing ri documentation for rails-html-sanitizer-1.0.2
Parsing documentation for railties-4.2.4
Installing ri documentation for railties-4.2.4
Parsing documentation for sprockets-3.4.0
Installing ri documentation for sprockets-3.4.0
Parsing documentation for sprockets-rails-3.0.0.beta2
Installing ri documentation for sprockets-rails-3.0.0.beta2
Parsing documentation for thor-0.19.1
Installing ri documentation for thor-0.19.1
Done installing documentation for actionmailer, actionpack, actionview, activejob, activemodel, activerecord, activesupport, arel, builder, crass, erubis, globalid, loofah, mail, mime-types, minitest, rack, rails, rails-deprecated_sanitizer, rails-dom-testing, rails-html-sanitizer, railties, sprockets, sprockets-rails, thor after 406 seconds
25 gems installed

Hi Mik,

Please install Ruby 2.2.x and respective DevKit from the following links for 64bit OS and then try again.
http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.3-x64.exe
http://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe

Best Regards,