在部署到Heroku时,我收到了两个项目的启动错误。两者都在本地运作良好,似乎sidekiq的工人启动会给乘客带来问题。我真的不明白问题的来源,并检查了我的procfile,我的sidekiq conf和其他元素。任何意见都会非常感激。
Nov 03 01:25:15 zugone-production app/web.1: [ 2015-11-03 09:25:14.9294 67/7fd6fe14d700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /app: An error occured while starting up the preloader.
Nov 03 01:25:15 zugone-production app/web.1: Error ID: 1a5af3e4
Nov 03 01:25:15 zugone-production app/web.1: Error details saved to: /tmp/passenger-error-UjpmyP.html
Nov 03 01:25:15 zugone-production app/web.1: Message from application: /app/vendor/bundle/ruby/2.0.0/gems/heroku-deflater-0.6.1/lib/heroku-deflater/serve_zipped_assets.rb:15: syntax error, unexpected ':', expecting =>
Nov 03 01:25:15 zugone-production app/web.1: ...= { headers: { 'Cache-Control': cache_control } } if Rails::...
Nov 03 01:25:15 zugone-production app/web.1: ... ^ (SyntaxError)
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/heroku-deflater-0.6.1/lib/heroku-deflater/railtie.rb:3:in `<top (required)>'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/heroku-deflater-0.6.1/lib/heroku-deflater.rb:1:in `<top (required)>'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
Nov 03 01:25:15 zugone-production app/web.1: /app/config/application.rb:9:in `<top (required)>'
Nov 03 01:25:15 zugone-production app/web.1: /app/config/environment.rb:2:in `require'
Nov 03 01:25:15 zugone-production app/web.1: /app/config/environment.rb:2:in `<top (required)>'
Nov 03 01:25:15 zugone-production app/web.1: config.ru:3:in `require'
Nov 03 01:25:15 zugone-production app/web.1: config.ru:3:in `block in <main>'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
Nov 03 01:25:15 zugone-production app/web.1: config.ru:1:in `new'
Nov 03 01:25:15 zugone-production app/web.1: config.ru:1:in `<main>'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:110:in `eval'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:110:in `preload_app'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
Nov 03 01:25:15 zugone-production app/web.1: /app/vendor/bundle/ruby/2.0.0/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:29:in `<main>'
Nov 03 01:25:15 zugone-production app/web.1: [ 2015-11-03 09:25:14.9793 67/7fd6dbfff700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 3-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error.
Nov 03 01:25:15 zugone-production app/web.1: [ 2015-11-03 09:25:14.9801 67/7fd6f6ffe700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error.
Nov 03 01:25:15 zugone-production app/web.1: [ 2015-11-03 09:25:14.9803 67/7fd6f5ffd700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 2-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error.
Nov 03 01:25:15 zugone-production app/web.1: [ 2015-11-03 09:25:14.9806 67/7fd6c3fff700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 6-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error.
Nov 03 01:25:15 zugone-production app/web.1: [ 2015-11-03 09:25:14.9807 67/7fd6c1ffd700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 8-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error.
Nov 03 01:25:15 zugone-production app/web.1: [ 2015-11-03 09:25:14.9809 67/7fd6c2ffe700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 7-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error.
Nov 03 01:25:15 zugone-production app/web.1: [ 2015-11-03 09:25:14.9811 67/7fd6daffe700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 4-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error.
Nov 03 01:25:15 zugone-production app/web.1: [ 2015-11-03 09:25:14.9812 67/7fd6d9ffd700 age/Cor/Req/CheckoutSession.cpp:253 ]: [Client 5-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 1a5af3e4. Please see earlier logs for details about the error.
Nov 03 01:25:16 zugone-production heroku/router: at=info method=GET path="/" host=www.zug-erstattung.de request_id=39412581-e55c-4e29-8730-c4c1694b660b fwd="172.21.225.211,130.238.98.89" dyno=web.1 connect=1ms service=5903ms status=500 bytes=2847
Nov 03 01:25:16 zugone-production app/worker.1: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require': /app/vendor/bundle/ruby/2.0.0/gems/heroku-deflater-0.6.1/lib/heroku-deflater/serve_zipped_assets.rb:15: syntax error, unexpected ':', expecting => (SyntaxError)
Nov 03 01:25:16 zugone-production app/worker.1: ...= { headers: { 'Cache-Control': cache_control } } if Rails::...
Nov 03 01:25:16 zugone-production app/worker.1: ... ^
答案 0 :(得分:1)
我在1小时前遇到了同样的问题。
语法错误: /app/vendor/bundle/ruby/2.1.0/gems/heroku-deflater-0.6.1/lib/heroku-deflater/serve_zipped_assets.rb:15: 语法错误,意外&#39;:&#39;,expecting =&gt; ... = {headers:{ &#39; Cache-Control&#39;:cache_control}}如果Rails :: ...
似乎heroku-deflater在21小时前更新过。 虽然我不知道造成这个错误的原因, 通过在Gemfile上定义heroku-deflater版本,我能够在Heroku上使我的应用程序运行良好。
■Gemfile
gem&#39; heroku-deflater&#39;,&#39; 0.5.3&#39;,:group =&gt; :生产
我想等待heroku-deflater再次更新。
谢谢!