From: Tom Boilard Date: 2011-06-11T11:40:19+09:00 Subject: [ruby-core:36958] [Ruby 1.9 - Bug #4868] ActiveSupport::JSON.decode Fails Decoding Date/Time String Issue #4868 has been updated by Tom Boilard. From the error message above it appears that the issue is related to ruby 1.9.2 and psych. The issue does not occur when running rails 3.0.7 and ruby 1.8.7. ---------------------------------------- Bug #4868: ActiveSupport::JSON.decode Fails Decoding Date/Time String http://redmine.ruby-lang.org/issues/4868 Author: Tom Boilard Status: Third Party's Issue Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.4] Issuing the command... ActiveSupport::JSON.decode('[{"created_at":"2011-06-10T18:09:09-04:00"}]') using the rails console results in the following error... Psych::SyntaxError: couldn't parse YAML at line 1 column 30 from /Users/tboilard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych.rb:148:in parse' from /Users/tboilard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych.rb:148:inparse_stream' from /Users/tboilard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych.rb:119:in parse' from /Users/tboilard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych.rb:106:inload' from /Users/tboilard/.rvm/gems/ruby-1.9.2-p180@rails307/gems/activesupport-3.0.7/lib/active_support/json/backends/yaml.rb:15:in decode' from /Users/tboilard/.rvm/gems/ruby-1.9.2-p180@rails307/gems/activesupport-3.0.7/lib/active_support/json/decoding.rb:14:indecode' from (irb):46 from /Users/tboilard/.rvm/gems/ruby-1.9.2-p180@rails307/gems/railties-3.0.7/lib/rails/commands/console.rb:44:in start' from /Users/tboilard/.rvm/gems/ruby-1.9.2-p180@rails307/gems/railties-3.0.7/lib/rails/commands/console.rb:8:instart' from /Users/tboilard/.rvm/gems/ruby-1.9.2-p180@rails307/gems/railties-3.0.7/lib/rails/commands.rb:23:in ' from script/rails:6:inrequire' from script/rails:6:in `' Running Rails 3.0.7 and ruby-1.9.2-p180. Issue was discovered while updating a rails 2.3.11 app to rails 3. Please let me know if you need any other information. Thanks Tom -- http://redmine.ruby-lang.org