我的rake任务语法不正确。显然,我是世界上最可怕的开发者。当我在本地启动我的rails服务器时,没有任何中断。在部署并运行assets:precompile
时,它会中止,因为完全独立的文件中的语法错误但没有退出代码。
问题: 如何development
环境引发错误,例如production
env没有在production
中运行?想在早期/本地或预编译之前看到它发生吗?
output /home/releases/1482452394/lib/tasks/listings.rake:8: syntax error, unexpected keyword_end, expecting end-of-input
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:245:in `load'
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:245:in `block in load'
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:236:in `load_dependency'
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:245:in `load'
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/engine.rb:425:in `block in load_tasks'
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/engine.rb:425:in `each'
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/engine.rb:425:in `load_tasks'
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/application.rb:145:in `load_tasks'
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/railtie/configurable.rb:30:in `method_missing'
output /home/releases/1482452394/Rakefile:13:in `<top (required)>'
output (See full trace by running task with --trace)
output rake aborted!
output SyntaxError: /home/releases/1482452394/lib/tasks/listings.rake:4: syntax error, unexpected ',', expecting keyword_end
output ...id).each_with_index |author_id, index|
output ... ^
output /home/releases/1482452394/lib/tasks/listings.rake:8: syntax error, unexpected keyword_end, expecting end-of-input
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:245:in `load'
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:245:in `block in load'
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:236:in `load_dependency'
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:245:in `load'
output /home/releases/1482452394/vendor/bundle/ruby/2.1.0/gems/railties-3.2.22/lib/rails/engine.rb:425:in `block in load_tasks'