3
在我的OS X的開發系統:爲什麼yaml在生產中不可用?
$ ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [universal-darwin8.0]
$ script/console
Loading development environment (Rails 2.3.4)
>> require 'yaml'
=> []
在CentOS 5.3的生產系統:
$ script/console production
Loading production environment (Rails 2.3.4)
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:1959:in `method_missing':NoMethodError: undefined method `define_index' for #<Class:0x2e6f7b0>
>> require 'yaml'
=> false
什麼我可以做的NoMethodError?
爲什麼yaml不可用。它不是核心Ruby庫的一部分嗎?