I'm having a similar problem today. Here's a bit of my log:
Started POST "/users/sign_in" for 173.228.60.113 at 2015-09-29 15:53:47 +0000
MultiJson::AdapterError (Did not recognize your adapter specification (cannot load such file -- json/ext/parser).):
activesupport (3.2.3) lib/active_support/dependencies.rb:251:in `require'
activesupport (3.2.3) lib/active_support/dependencies.rb:251:in `block in require'
activesupport (3.2.3) lib/active_support/dependencies.rb:236:in `load_dependency'
activesupport (3.2.3) lib/active_support/dependencies.rb:251:in `require'
json (1.8.3) lib/json/ext.rb:13:in `'
json (1.8.3) lib/json/ext.rb:12:in `'
json (1.8.3) lib/json/ext.rb:9:in `'
bundle show
(on the ec2 instance) shows where the json gem is installed:
[ec2-user@ip-172-31-43-145 current]$ bundle show json
/usr/local/share/gems1.9/gems/json-1.8.3
Below that directory there is a file ext/json/ext/parser/parser.so
This is a native extension. I've run into issues with these not installing correctly many times before. My workaround is to install a symlink in lib/json/ext
The command looks like this:
ln -s ../../../ext/json/ext/parser/parser.so .
from the above directory.
I also put in a symlink for generator.so. The command, executed while connected to lib/json/ext
was:
ln -s ../../../ext/json/ext/generator/generator.so .
There's another directory under ext/json
called fbuffer
, but it only has a .h file, no .so.
This resolved the issue. I knew where to look because the error message always tells you a path relative to the core gem .rb file, which in this case was ext/json/json.rb
I am not at all happy about having to do this by hand each time a gem with a native extension updates. I would very much like it if someone could tell me how to not have to do that. But in the meantime, this will fix it.