views:

427

answers:

1

I am running on windows vista 64 bit operating system. Geografikos is a large project created as a masters thesis project by Jeremy Witmer. It is all coded in JRuby. I am currently expanding the project under his guidance however I cannot run his program. The following gems have been installed:

C:\work\Code\geografikos>jruby -S gem list

*** LOCAL GEMS ***

actionmailer (2.3.3)
actionpack (2.3.3)
activerecord (2.3.3)
activerecord-jdbc-adapter (0.9.1)
activerecord-jdbcmysql-adapter (0.9.1)
activeresource (2.3.3)
activesupport (2.3.3)
gchart (1.0.0)
google-geocode (1.2.1)
hoe (2.3.3)
hpricot (0.6.161)
jdbc-mysql (5.0.4)
jruby-openssl (0.5.1)
minitest (1.4.2)
nokogiri (1.3.3)
rack (1.0.0)
rails (2.3.3)
rake (0.8.7)
rc-rest (3.0.0)
rdoc (2.4.3)
rspec (1.2.6)
rubyforge (1.0.4)
rubygems-update (1.3.5)
sources (0.0.1)

geografikos.rb requires the following gems:

%w(rubygems digest/sha1 digest/md5 active_record hpricot yaml open-uri ostruct java google_geocode gchart active_record/fixtures).each{|f| require f}

I get the following error when I require or run geografikos.rb:

C:\work\Code\geografikos>jirb
irb(main):001:0> require 'geografikos'
LoadError: Could not open any of [xml2, xslt, exslt]
        from C:/jruby-1.3.1/bin/../lib/ruby/1.8/ffi/library.rb:18:in `ffi_lib'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3.3-java/lib/nokogiri/ffi/libxml.rb:5
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3.3-java/lib/nokogiri/ffi/libxml.rb:31:in `require'
        from C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in
'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3.3-java/lib/nokogiri.rb:10
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3.3-java/lib/nokogiri.rb:31:in `require'
        from C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in
'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/rc-rest-3.0.0/lib/rc_rest.rb:3
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/rc-rest-3.0.0/lib/rc_rest.rb:31:in `require'
        from C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in
'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/google-geocode-1.2.1/lib/google_geocode.rb:2
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/google-geocode-1.2.1/lib/google_geocode.rb:36:in `require'
        from C:/jruby-1.3.1/bin/../lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:521:in `new_constants_in
'
        from C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:156:in `require'
        from geografikos.rb:304
        from geografikos.rb:304:in `each'
        from geografikos.rb:304
        from geografikos.rb:2:in `require'
        from (irb):2irb(main):002:0>

I have a feeling that I need to install the xml, xml2, xslt, and exslt libraries but I get an error when I attempt to install these which is shown below:

C:\work\Code\geografikos>jruby -S gem install libxml-ruby
Building native extensions.  This could take a while...
ERROR:  Error installing libxml-ruby:
        ERROR: Failed to build gem native extension.

C:/jruby-1.3.1/bin/../bin/jruby.bat extconf.rb
C:/jruby-1.3.1/bin/../lib/ruby/1.8/mkmf.rb:7: JRuby does not support native extensions. Check wiki.jruby.org for alternatives. (No
tImplementedError)
        from C:/jruby-1.3.1/bin/../lib/ruby/1.8/mkmf.rb:14:in `require'
        from extconf.rb:14


Gem files will remain installed in C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3 for inspection.
Results logged to C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/ext/libxml/gem_make.out

Please let me know if you need any other information. I cannot solve this problem!

+1  A: 

It appears that those gems are implemented "natively"; that is, in a low-level language rather than directly in Ruby. JRuby does not support gems with native extensions because it can't run them in the JVM.

Thom Smith