stripe/stripe-ruby — Issue #16: Error trying to retrieve events
Author: agoel
Created: 2012-02-20 20:28:26+00:00
State: open

---------- Forwarded message ----------
From: Amit Saxena
Date: Mon, Feb 20, 2012 at 4:28 AM
Subject: Getting error while trying to access stripe events API via Ruby gem
To: support@stripe.com
Cc: simon@mazdigital.com

Hi,

I am working on webhooks and while trying to access existing events via rails console, I get the following exception:

irb(main):018:0> Stripe::Event.all
NoMethodError: undefined method `encode_json' for :disputed:Symbol
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:214:in `encode_json'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:214:in `map'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:214:in `encode_json'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:214:in `encode_json'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:214:in `map'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:214:in `encode_json'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:214:in `encode_json'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:214:in `map'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:214:in `encode_json'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:214:in `encode_json'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:214:in `map'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:214:in `encode_json'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:47:in `encode'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:77:in `check_for_circular_references'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:45:in `encode'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.11/lib/active_support/json/encoding.rb:247:in `encode_json'
... 9 levels...
from /usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/common.rb:278:in `generate'
from /usr/lib/ruby/gems/1.8/gems/json-1.6.5/lib/json/common.rb:278:in `pretty_generate'
from /usr/lib/ruby/gems/1.8/gems/stripe-1.6.0/lib/stripe.rb:179:in `inspect'
from /usr/lib/ruby/1.8/irb.rb:310:in `output_value'
from /usr/lib/ruby/1.8/irb.rb:159:in `eval_input'
from /usr/lib/ruby/1.8/irb.rb:271:in `signal_status'
from /usr/lib/ruby/1.8/irb.rb:155:in `eval_input'
from /usr/lib/ruby/1.8/irb.rb:154:in `eval_input'
from /usr/lib/ruby/1.8/irb.rb:71:in `start'
from /usr/lib/ruby/1.8/irb.rb:70:in `catch'
from /usr/lib/ruby/1.8/irb.rb:70:in `start'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.11/lib/rails/commands/console.rb:44:in `start'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.11/lib/rails/commands/console.rb:8:in `start'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.11/lib/rails/commands.rb:23
from script/rails:6:in `require'
from script/rails:6irb(main):019:0>