我想運行FlightXML2 Ruby庫來訪問FlightAware API。 (該庫的代碼是在這裏:https://github.com/flightaware/flightxml2-client-ruby)如何解決Ruby「沒有這樣的文件加載 - xsd/qname」錯誤?
當包括行庫文件「要求‘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?
感謝您的回覆!這消除了上述例外。我不得不添加一些東西來擺脫後續的錯誤,正如我在答案中詳細說明的那樣。 – SpaceInvader
@SpaceInvader什麼東西 –