For the record: this was due to this line in an initialiser:
   ActiveSupport::JSON.backend = "JSONGem"

Commenting it solved the problem.

Raph


On Fri, Jul 12, 2013 at 1:48 PM, Raphael Bauduin <[email protected]> wrote:

> Hi,
>
> I'm in the process of upgrading an app from rails 3.0.6 to 3.2.13.
>
> I have a problem with multi_json not recognising any json adapter.
>
> I have tested with the gems json-1.8.0 and oj (2.1.4), without success...
> Inpsecting the adapter it is looking for, I get JSONGem, which seems
> correct, as I have an adapter in
>
> /usr/lib/ruby/gems/1.8/gems/multi_json-1.7.7/lib/multi_json/adapters/json_gem.rb
>
> which has the class
> class JsonGem < JsonCommon
>
> I've tried to manually set the adapter used as described at
> http://weblog.rubyonrails.org/2009/4/24/this-week-in-edge-rails/ :
>
>   gem 'json'
>   # JSON gem loaded, which overwrites to_json
>   ActiveSupport::JSON.backend = "JsonGem"/"JSONGem"/....
>
> but to no avail.
>
> The gems are available, as checked with:
> $ bundle show | grep json
>   * json (1.8.0)
>   * multi_json (1.7.7)
>
> I've tried with ruby 1.8.7 and ruby 1.9.2.
>
> Does anyone have suggestions of how to fix this?
>
> Thanks
>
>
>


-- 
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAONrwUG_-Oho2SCmKOKiJ6_C0%2BCGjZ6Q80DWEkLH8ce_8tz7TA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to