开发者

i'm getting this error: uninitialized constant YAML::ENGINE (NameError)

i have the code belowin the environment.rb and i keep getting the error uninitialized constant YAML::ENGINE (NameError) when i try to run it.

environment.rb

require 'yaml' 
YAML::ENGINE.yamler= 'syck'
# Load the rails application
require File.expand_path('../application', __FILE__)

# Initialize the rails application
Quora::Application.initialize!

anybody 开发者_如何学运维have an idea?


YAML::ENGINE doesn't exist in Ruby 1.8.7. This is defined in Ruby 1.9. I tried running irb on 1.8.7 and 1.9.2. Strange though, both of their YAML version number is the same (0.6.0).

Also, I think Ruby 1.8.7's YAML already uses SYCK for yaml parsing. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜