Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird issue {"json_class"=>"Symbol", "s"=>"identify"} is not a symbol #10

Open
tommyalvarez opened this issue Oct 2, 2015 · 6 comments

Comments

@tommyalvarez
Copy link

I'm receiving that error constantly while tracking events in controllers that are called with ajax, and are sent to mixpanel with sidekiq, and even when doing sign out. It appears that the error is located at: /mengpaneel/replayer.rb:36:in `public_send'
as well as server_side.rb:33.

What could be the problem?

@DouweM
Copy link
Owner

DouweM commented Oct 2, 2015

What Ruby version are you using? What Rails version? What JSON version (JSON::VERSION)?

What are you getting for :test.method(:as_json).source_location?

@tommyalvarez
Copy link
Author

Ruby 2.1.6 on rails 4.1.5!

On Friday, October 2, 2015, Douwe Maan notifications@github.com wrote:

What Ruby version are you using? What Rails version?


Reply to this email directly or view it on GitHub
#10 (comment).

@DouweM
Copy link
Owner

DouweM commented Oct 2, 2015

@tommyalvarez hmm, all right. How about the two questions I edited in later? ;)

@tommyalvarez
Copy link
Author

@DouweM JSON::VERSION
=> "1.8.3"
:test.method(:as_json).source_location
=> ["/home/tommy/.rvm/gems/ruby-2.1.6@chefandme/gems/json-1.8.3/lib/json/add/symbol.rb", 9]

@tommyalvarez
Copy link
Author

@DouweM updates?

@DouweM
Copy link
Owner

DouweM commented Oct 7, 2015

@tommyalvarez Sorry—missed your second comment so didn't investigate further.

I'm seeing this for the source_location:

["/Users/douwemaan/.rvm/gems/ruby-2.1.6/gems/activesupport-4.1.12/lib/active_support/core_ext/object/json.rb", 86]

Looks like the regular JSON and ActiveSupport Symbol#as_json implementations are different. For :test.as_json, you get {"json_class"=>"Symbol", "s"=>"test"} using the former, I get "test" using the latter. The latter being what mengpaneel expects.

Do you do anything interesting around (not) loading ActiveSupport? :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants