0

I've got a strange error with a rails 3.0.3 application running on ruby 1.9.2, as a matter a fact it doesn't run yet, beacause I get the following error:

ArgumentError (Syck is not missing constant BadAlias!):


Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.0ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (14.4ms)
Rendered /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (19.4ms)

Is because of the ruby version? Or how can I solve this?

-- later edit:
On ruby 1.8.7 EE, I have no such error.

  • http://pivotallabs.com/users/will/blog/articles/986-standup-8-21-2009-not-missing-constant-and-rake-set-theory- – cristian Aug 07 '11 at 15:06
  • I don't think it applies to my case. I've got the app working on snow leopard, I get this error on deploying to ubuntu server :| –  Aug 07 '11 at 15:39
  • try putting this line in your application.rb `YAML::ENGINE.yamler = 'syck'`. Ref: http://stackoverflow.com/questions/6140493/database-yml-references-not-working/6140900#6140900. I read somewhere that this already got solved though. Just a shot in the dark. – rubish Aug 10 '11 at 18:46
  • I tried that. But I get same error. #require 'psych' (or without comment) #require 'yaml'(or without comment) YAML::ENGINE.yamler= 'syck' require File.expand_path('../boot', __FILE__) require 'rails/all' –  Aug 10 '11 at 18:51
  • syck is supposedly being replaced by psych as the default yaml engine in ruby 1.9, iirc. Have you tried using psych instead? – Frost Aug 11 '11 at 08:07
  • same error, but I've solved it. It was a YAML Error :| –  Aug 11 '11 at 08:55

1 Answers1

1

After searching and searching the internet, I started to look at all my YAML in my app, and I validate each file using: http://yaml-online-parser.appspot.com/, and I've got errors like:

while parsing a flow node
expected the node content, but found ':'
  in "<unicode string>", line 147, column 13:
        order: [:day, :month, :year]

Therefore everything was because the yaml errors. The problem is with unicode, in seems that its different on ruby 1.9.2 than in 1.8.7.