2

このエラーが発生しました。これは multi_json gem のこのコード行から発生していると思いますが、なぜそれがトリガーされているのかを知るには十分な調査ができていません?!?

開発とテストではすべてが正常に機能しますが、deploy:assets:update_asset_mtimesタスクは失敗しますcap deploy:migrations

なぜこれが起こっているのかについてのヒントはありますか?multi_json前回の展開以降に改訂されているため、以前のバージョンにロールバックしてみてください。ただし、失敗する理由を知りたいです...

血まみれの詳細:

$ cap deploy:migrations
...
  * 2013-08-13 15:18:44 executing `deploy:assets:update_asset_mtimes'
  * executing "[ -e /path/to/rails/myapp/shared/assets/manifest* ] && cat /path/to/rails/myapp/shared/assets/manifest* || echo"
    servers: ["railserver"]
    [railserver] executing command
    command finished in 888ms
 ** Updating mtimes for ~16 assets...
    servers: ["railserver"]
 ** scp upload #<StringIO:0x007f8651ba7fa0> -> /path/to/rails/myapp/TOUCH_ASSETS
    [railserver] /path/to/rails/myapp/TOUCH_ASSETS
  * scp upload complete
  * executing "cat /path/to/rails/myapp/TOUCH_ASSETS | while read asset; do touch -c -- \"$asset\"; done && rm -f -- /path/to/rails/myapp/TOUCH_ASSETS"
    servers: ["railserver"]
    [railserver] executing command
    command finished in 846ms
  * executing "cd -- /path/to/rails/myapp/releases/20130813221752 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile"
    servers: ["railserver"]
    [railserver] executing command
 ** [out :: railserver] rake aborted!
 ** [out :: railserver] Did not recognize your adapter specification.
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/multi_json-1.7.9/lib/multi_json.rb:106:in `rescue in load_adapter'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/multi_json-1.7.9/lib/multi_json.rb:95:in `load_adapter'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/multi_json-1.7.9/lib/multi_json.rb:99:in `load_adapter'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/multi_json-1.7.9/lib/multi_json.rb:89:in `use'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/multi_json-1.7.9/lib/multi_json.rb:71:in `adapter'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/multi_json-1.7.9/lib/multi_json.rb:129:in `current_adapter'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/multi_json-1.7.9/lib/multi_json.rb:116:in `load'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:229:in `json_decode'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems
 ** [out :: railserver] /sprockets-2.10.0/lib/sprockets/manifest.rb:65:in `initialize'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/railtie.rb:96:in `new'
 ** [out :: railserver] /path/to/rails/myapp/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 :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/railtie.rb:78:in `instance_eval'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/railtie.rb:78:in `block in <class:Railtie>'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:36:in `call'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:45:in
 ** [out :: railserver] `block in run_load_hooks'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:44:in `each'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/
 ** [out :: railserver] 2.0.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
 ** [out :: railserver] /path/to/rails/myapp/releases/20130813221752/config/environment.rb:5:in `<top (required)>'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
 ** [out :: railserver] /path/to/rails/myapp/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
 ** [out :: railserver] /Library/WebServ
 ** [out :: railserver] er/rails/myapp/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:249:in `block in run_tasks_blocks'
 ** [out :: railserver] /path/to/rails/myapp/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 :: railserver] Tasks: TOP => environment
 ** [out :: railserver] (See full trace by running task with --trace)
    command finished in 9278ms
failed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'ruby-2.0.0-p247@myapp' -c 'cd -- /path/to/rails/myapp/releases/20130813221752 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile'" on railserver
4

1 に答える 1

1

のように、適切な JSON gem を指定していますGemfileか?

gem 'yajl-ruby', :require => "yajl"

また

gem 'json'
于 2013-08-13T22:49:18.133 に答える