NoMethodError (undefined method `to_hash' for #<CGI::Session:0x2b73dc4b9c60>)
I get this error after upgrading to the newest Hoptoad and running Rails 2.2.2.
The error is happening here:
/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier/catcher.rb:40:in
request_data_for_hoptoad'
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by thoughtbot on 09 Nov, 2009 07:04 PM
Hi,
Can you paste the output of script/about ?
Thanks,
Mike.
3 Posted by Limos on 09 Nov, 2009 10:04 PM
About your application's environment
Ruby version 1.8.7 (universal-darwin10.0)
RubyGems version 1.3.5
Rails version 2.2.2
Active Record version 2.2.2
Action Pack version 2.2.2
Active Resource version 2.2.2
Action Mailer version 2.2.2
Active Support version 2.2.2
Edge Rails revision unknown
Application root /trunk
Environment development
Database adapter mysql
Database schema version 20091106050711
4 Posted by system on 10 Nov, 2009 04:10 PM
An internal ticket was created for this discussion
Support Staff 5 Posted by Joe Ferris on 10 Nov, 2009 04:11 PM
Hi,
This may be an incompatibility with the new notifier and older versions of Rails. We'll check into this and make sure that all supported versions work as expected.
Thanks,
-Joe
6 Posted by SocialVibe on 13 Nov, 2009 08:23 PM
Seeing the same thing on Rails 2.2.2 with the newest notifier plugin. Any updates?
7 Posted by assembla on 14 Nov, 2009 05:20 PM
Why are you encouraging people to upgrade if the version is not stable ?
Any ETA when will it be fixed ?
8 Posted by Matt Powell on 16 Nov, 2009 03:44 AM
Same here, on Rails 2.0.2. This is actually kind of upsetting: I know 2.0.2 is an older version, but I checked compatibility in the README before upgrading the plugin, and now things are broken :(
9 Posted by Matt Powell on 16 Nov, 2009 03:54 AM
In the meantime, anybody having problems can try putting the following in
config/hoptoad.rb:Seems to work for me.
10 Posted by Matt Powell on 16 Nov, 2009 03:59 AM
Oh: should mention that that code is only for TestSession, and fixes for other classes will vary depending on what you're using.
Support Staff 11 Posted by Joe Ferris on 16 Nov, 2009 06:22 PM
Hi everybody,
Sorry for the inconvenience. We just released version 2.0.4 of the notifier, which contains fixes for several versions of Rails. Can you guys try this out and confirm that your issues are fixed with the latest notifier?
Thanks,
-Joe
12 Posted by Matt Powell on 16 Nov, 2009 09:34 PM
Seems to be working in 2.0.2. Thanks Joe!
Support Staff 13 Posted by Joe Ferris on 16 Nov, 2009 09:39 PM
Thanks, Matt. I'm marking this as resolved, but if anybody is still running into the "undefined method to_hash" issue, please let us know.
-Joe
Joe Ferris resolved this discussion on 16 Nov, 2009 09:39 PM.