我收到了这个错误,我认为它来自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