Adapter error when precompiling Rails 4 assets #132

Closed
demetrios opened this Issue Aug 14, 2013 · 13 comments

Projects

None yet

2 participants

@demetrios

Getting "did not recognize your adapter specification" error after upgrading to 1.7.9 but it goes away after downgrading to 1.7.7.

You can see the details on SO: http://stackoverflow.com/questions/18220485/capistrano-deploy-did-not-recognize-your-adapter-specification-during-assets/18220544

@rwz
Member
rwz commented Aug 14, 2013
  1. Does it work with 1.7.8?
  2. Can you provide an isolated example that I could use to recreate the error?
@demetrios

-- - Yes it does work with 1.7.8; so apparently the bug was introduced with 1.7.9.
-- - It's a small/medium size project but not on a public repo; will be hard/impossible to whittle it down to an isolated example that contains the error.

@rwz
Member
rwz commented Aug 25, 2013

Anyone else has symptoms like this?

@demetrios can you provide a stacktrace?

@rwz
Member
rwz commented Sep 8, 2013

Closing for now. Will reopen if any additional info is provided

@rwz rwz closed this Sep 8, 2013
@demetrios

problem persists in 1.8.0. output from cap deploy:

executing "cd -- /rails/converter/releases/20130925165056 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile"
    servers: ["servb"]
    [servb] executing command
 ** [out :: servb] rake aborted!
 ** [out :: servb] Did not recognize your adapter specification.
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/multi_json-1.8.0/lib/multi_json.rb:108:in `rescue in load_adapter'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/multi_json-1.8.0/lib/multi_json.rb:97:in `load_adapter'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/multi_json-1.8.0/lib/multi_json.rb:101:in `load_adapter'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/multi_json-1.8.0/lib/multi_json.rb:91:in `use'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/multi_json-1.8.0/lib/multi_json.rb:73:in `adapter'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/multi_json-1.8.0/lib/multi_json.rb:131:in `current_adapter'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/multi_json-1.8.0/lib/multi_json.rb:118:in `load'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:229:in `json_decode'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gem
 ** [out :: servb] s/sprockets-2.10.0/lib/sprockets/manifest.rb:65:in `initialize'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/railtie.rb:96:in `new'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/railtie.rb:96:in `block (2 levels) in <class:Railtie>'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/railtie.rb:78:in `instance_eval'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/railtie.rb:78:in `block in <class:Railtie>'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:36:in `call'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:45:in
 ** [out :: servb] `block in run_load_hooks'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:44:in `each'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
 ** [out :: servb] /rails/converter/shared/bundle/ruby
 ** [out :: servb] /2.0.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
 ** [out :: servb] /rails/converter/releases/20130925165056/config/environment.rb:5:in `<top (required)>'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
 ** [out :: servb] /Library/WebSer
 ** [out :: servb] ver/rails/converter/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:249:in `block in run_tasks_blocks'
 ** [out :: servb] /rails/converter/shared/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'
 ** [out :: servb] Tasks: TOP => environment
@rwz
Member
rwz commented Sep 25, 2013

That's strange. Can you try and run bundle exec rails runner 'puts MultiJson.adapter.name' on your server?

@rwz rwz reopened this Sep 25, 2013
@rwz
Member
rwz commented Sep 25, 2013

...and also this: bundle exec rails runner 'puts MultiJson.default_adapter.inspect'

@demetrios
$ bundle exec rails runner 'puts MultiJson.adapter.name'
MultiJson::Adapters::JsonGem
$ bundle exec rails runner 'puts MultiJson.default_adapter.inspect'
:json_gem

I'm not wedded to default json gem; I just need something that works.

@demetrios

Anything I can do to help troubleshoot this?

@rwz
Member
rwz commented Sep 27, 2013

Well, you could use 1.7.8 since it works for you until we figure out what's wrong.

@rwz
Member
rwz commented Sep 27, 2013

or 1.7.7

@demetrios

So, did some sleuthing related to a really cryptic encoding error I started getting (after this multi_json problem materialized). Anyway, looong story short, by changing one of my stylesheets names from .css to .scss my encoding error went away. I was still using 1.7.8 so, just for shits and giggles, tried to deploy again with multi_json 1.8.0 and low and behold…everything worked!

So, I'd close this issue; I'll pipe back in here if/when trouble arises again. <sigh>encoding</sigh>

@rwz
Member
rwz commented Sep 28, 2013

Huh? That's quite unexpected. I'm not even sure I understand how MultiJson is connected with CSS processing, unless it's not LESS

@rwz rwz closed this Sep 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment