zevarito / mixpanel

Simple lib to track events in Mixpanel service. It can be used in any rack based framework.
MIT License
273 stars 84 forks source link

IOError in `Person#set` #87

Closed hstove closed 11 years ago

hstove commented 11 years ago

I'm using Ruby 2.0 and Rails 4, and when calling @mixpanel.set I run into an IOError with the message not opened for reading.

Here is the stack trace - it must have to do with encoding.

activesupport (4.0.0.beta1) lib/active_support/json/encoding.rb:256:in `each'
activesupport (4.0.0.beta1) lib/active_support/json/encoding.rb:256:in `to_a'
activesupport (4.0.0.beta1) lib/active_support/json/encoding.rb:256:in `as_json'
activesupport (4.0.0.beta1) lib/active_support/json/encoding.rb:50:in `block in encode'
activesupport (4.0.0.beta1) lib/active_support/json/encoding.rb:81:in `check_for_circular_references'
activesupport (4.0.0.beta1) lib/active_support/json/encoding.rb:49:in `encode'
activesupport (4.0.0.beta1) lib/active_support/json/encoding.rb:34:in `encode'
activesupport (4.0.0.beta1) lib/active_support/core_ext/object/to_json.rb:16:in `to_json'
json (1.7.7) lib/json/common.rb:223:in `generate'
json (1.7.7) lib/json/common.rb:223:in `generate'
mixpanel (3.5.2) lib/mixpanel/tracker.rb:56:in `encoded_data'
mixpanel (3.5.2) lib/mixpanel/person.rb:66:in `engage'
mixpanel (3.5.2) lib/mixpanel/person.rb:7:in `set'
zevarito commented 11 years ago

hi @hstove, still running with the issue? it just happend with Ruby 2?