Multi_json does not recognise any adapter


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
Inpsecting the adapter it is looking for, I get JSONGem, which seems
correct, as I have an adapter in

which has the class
class JsonGem < JsonCommon

I’ve tried to manually set the adapter used as described at
Ruby on Rails — 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?


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

Commenting it solved the problem.


On Fri, Jul 12, 2013 at 1:48 PM, Raphael B. [email protected]



Web database:
Free Software Developers Meeting: