我收到一个神秘的错误cap deploy
$ cap deploy
. . .
* executing "cd -- /rails/myapp/releases/20130919002235 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile"
servers: ["persephone"]
[persephone] executing command
. . .
** [out :: persephone] rake aborted!
** [out :: persephone] Caught Encoding::CompatibilityError at '["ok","(function() {': incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
** [out :: persephone] (in /rails/myapp/releases/20130919002235/app/assets/javascripts/disk_files.js.coffee)
** [out :: persephone] /rails/myapp/shared/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/pure/parser.rb:242:in `rescue in parse_string'
** [out :: persephone] /rails/myapp/shared/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/pure/parser.rb:213:in `parse_string'
** [out :: persephone] /rails/myapp/shared/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/pure/parser.rb:257:in `parse_value'
** [out :: persephone] /rails/myapp/shared/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/pure/parser.rb:121:in `parse'
** [out :: persephone] /rails/myapp/shared/bundle/ruby/2.0.0/gems/json-1.8.0/lib/json/common.rb:155:in `parse'
. . .
在尝试调试问题时,我尝试完全删除disk_files.js.coffee
,然后出现相同的错误application.js
。
然后我更改了我的application.js
清单,使其不需要任何东西,然后我收到类似的错误application.css
我已经注释掉了我的自定义 CSS,现在我得到了:
** [out :: persephone] rake aborted!
** [out :: persephone] undefined method `[]' for nil:NilClass
** [out :: persephone] (in /rails/myapp/releases/20130919200133/app/assets/stylesheets/application.css)
** [out :: persephone] /rails/myapp/shared/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/sass_functions.rb:63:in `sprockets_context'
这些步骤中的每一个都需要一个 git commit 到 origin,然后一个cap deploy
.
FWIW-添加 #encoding: UTF-8 按照SO#9857443没有帮助。
有谁知道发生了什么?我该如何调试呢?