ruby-on-rails – 为什么yaml在生产中无法使用?
发布时间:2020-12-17 01:51:18 所属栏目:百科 来源:网络整理
导读:在我的OS X开发系统上: $ruby --versionruby 1.8.6 (2007-03-13 patchlevel 0) [universal-darwin8.0]$script/consoleLoading development environment (Rails 2.3.4) require 'yaml'= [] 在CentOS 5.3生产系统上: $script/console productionLoading prod
在我的OS X开发系统上:
$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库的一部分吗? 解决方法
返回false意味着加载成功或已经完成.如果无法加载,则会引发异常.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |