2009-08-20 1 views
1

Я запускаю Windows Vista 64-разрядную операционную систему. Geografikos - это большой проект, созданный Джереми Витмером в качестве магистерской диссертации. Все кодируется в JRuby. В настоящее время я расширяю проект под его руководством, но я не могу запустить его программу. были установлены следующие камни:Jruby LoadError: Не удалось открыть ни один из [xml2, xslt, exslt] WINDOWS

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 необходимы следующие камни:

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

Я получаю следующее сообщение об ошибке, когда я требую или запустить 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> 

У меня возникло ощущение, что мне нужно установить библиотеки xml, xml2, xslt и exslt, но я получаю сообщение об ошибке при попытке установить их, которые показаны ниже:

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 

Пожалуйста, дайте мне знать, если вам нужна какая-либо другая информация. Я не могу решить эту проблему!

ответ

2

Похоже, что эти драгоценные камни выполнены «изначально»; то есть на языке низкого уровня, а не непосредственно в Ruby. JRuby не поддерживает камни с родными расширениями, потому что не может запускать их в JVM.