2016-08-18 85 views
0

背景:嘗試將狂歡推向heroku。它可以在localhost中運行:3000,但在heroku中沒有運氣。錯誤的參數數量(0表示1)(ArgumentError)當git push heroku主人

推了heroku高手之後,沒有錯誤。但是,當打開heroku它顯示應用程序錯誤。

誰能幫助擺脫了 「錯誤的參數數目」

當Heroku的打開

Application Error 

An error occurred in the application and your page could not be served. Please try again in a few moments. 

If you are the application owner, check your logs for details. 

在Heroku的日誌,還有超時如下

Starting process with command `bundle exec unicorn -p 56138 -c ./config/unicorn.rb` 
2016-08-18T05:52:21.426098+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/unicorn- 5.1.0/lib/unicorn/configurator.rb:196:in `timeout': wrong number of arguments (0 for 1) (ArgumentError) 

回答

0

在此處關注某人的博客代碼時發生錯誤

worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3) 
timeout 
timeout 15 
preload_app true 
before_fork do |server, worker| 
Signal.trap 'TERM' do 
    puts 'Unicorn master intercepting TERM and sending myself QUIT instead' 
    Process.kill 'QUIT', Process.pid 
end 
defined?(ActiveRecord::Base) and 
    ActiveRecord::Base.connection.disconnect! 
end 
after_fork do |server, worker| 
Signal.trap 'TERM' do 
    puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT' 
end 
defined?(ActiveRecord::Base) and 
    ActiveRecord::Base.establish_connection 
end 

從第二行

timeout 

有錯誤刪除的超時然後它的工作。

相關問題