我正在尝试运行 FlightXML2 Ruby 库来访问 FlightAware API。(图书馆的代码在这里:https ://github.com/flightaware/flightxml2-client-ruby )
当包含带有“require 'FlightXML2.rb'”行的库文件时,会发生以下异常:
LoadError: no such file to load -- xsd/qname
from /...PATH TO GEMS.../activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /...PATH TO GEMS.../activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from /...PATH TO GEMS.../activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /...PATH TO GEMS.../activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /...PATH TO GEMS.../lib/FlightXML2.rb:1:in `<top (required)>'
from /...PATH TO GEMS.../activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /...PATH TO GEMS.../activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from /...PATH TO GEMS.../activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /...PATH TO GEMS.../activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from (irb):2
from /...PATH TO GEMS.../railties-3.2.9/lib/rails/commands/console.rb:47:in `start'
from /...PATH TO GEMS.../railties-3.2.9/lib/rails/commands/console.rb:8:in `start'
from /...PATH TO GEMS.../railties-3.2.9/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
我怀疑这与编写库的 Ruby 1.9 和 1.8 之间的不兼容有关。有没有办法让这个工作与 Ruby 1.9 一起工作?