Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 731
hilarl Avatar asked Jan 20 '23 01:01

hilarl


1 Answers

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. :)

like image 163
mikong Avatar answered Jan 29 '23 10:01

mikong