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

undefined method `to_json' for Hash #128

Open
asymmetric opened this issue Mar 20, 2015 · 1 comment
Open

undefined method `to_json' for Hash #128

asymmetric opened this issue Mar 20, 2015 · 1 comment

Comments

@asymmetric
Copy link

Hi, I'm trying to integrate HipChat into my Capistrano deployment.

I've followed the instructions on the README, but I get this error:

undefined method `to_json' for #<Hash:0x0000000169b648>

Googling, I found PR #61, which led me to adding a require "json" just before require hipchat/capistrano.

This fixed the issue.

What also fixed the issue was a require "active_support/core_ext".

Tried on Rails 3.2.18 on ruby 1.9.3-p125 and -p551.

Any idea what's going on? Is the information in the README incorrect?

@asymmetric asymmetric changed the title undefined method `to_json' for #<Hash:0x0000000169b648> undefined method `to_json' for Hash Mar 20, 2015
@oogali
Copy link

oogali commented Jul 2, 2016

I ran into the same issue, and your workaround worked for me. I'm using this in a Sinatra project.

I'm guessing that the gem authors assumed the #to_json method is always present in the environment.

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

Successfully merging a pull request may close this issue.

2 participants