Forum: Ruby on Rails to_json conflict with json gem and rails 2.1

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
91a296784a35bb4efb6221abc282127d?d=identicon&s=25 Adam Greene (Guest)
on 2009-01-11 03:58
(Received via mailing list)
hey folks,

this has been brought up twice in this group and once in rails core,
but I couldn't find a solution.

Specifically, I'm using the twitter gem within my rails project, and
this eventually loads in the json gem.  It wreaks havoc and throws
this error:

wrong argument type Hash (expected Data)

when calling .to_json.

The problem is that it the json gem and active_support create
different to_json method signatures for data types like date, time,
etc.

What is the preferred way to work around this issue?  I've tried all
the different loading combinations that I can think of (require 'json'
before and after active_support, etc), but with no luck.  Has anyone
solved this issue?  (lets assume I have to load both active_support
and json)

Thanks in advance!
Adam
D4df2b9d483c6615a304abc4857e6cbf?d=identicon&s=25 matthias (Guest)
on 2009-02-02 17:10
(Received via mailing list)
same problem here, any solution yet?
This topic is locked and can not be replied to.