Skip to content

Instantly share code, notes, and snippets.

@jacqui
Created July 9, 2010 18:54
Show Gist options
  • Select an option

  • Save jacqui/469864 to your computer and use it in GitHub Desktop.

Select an option

Save jacqui/469864 to your computer and use it in GitHub Desktop.
irb(main):014:0> Submission.for_project("gulf-oil-spill").pending.to_json
ActiveSupport::JSON::Encoding::CircularReferenceError: object references itself
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:59:in `check_for_circular_references'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:47:in `encode'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:222:in `encode_json'
from (irb):14:in `map'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:222:in `each'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:222:in `map'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:222:in `encode_json'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:48:in `encode'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:62:in `check_for_circular_references'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:47:in `encode'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:203:in `encode_json'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:203:in `map'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:203:in `encode_json'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:48:in `encode'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:62:in `check_for_circular_references'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/json/encoding.rb:47:in `encode'
... 11 levels...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment