0
我一直在試圖將我的rails 4應用程序部署到heroku並使用Puma。我使用的美洲獅配置從https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#adding-puma-to-your-applicationHeroku rails 4 + puma deployment
但我仍然收到錯誤。請讓我知道做些什麼改變才能使它工作。錯誤是
> 2016-04-15T02:37:43.118777+00:00 heroku[web.1]: State changed from down to starting
2016-04-15T02:37:43.118406+00:00 heroku[web.1]: Unidling
2016-04-15T02:37:45.374269+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb`
2016-04-15T02:37:47.238844+00:00 app[web.1]: [3] Puma starting in cluster mode...
2016-04-15T02:37:47.238871+00:00 app[web.1]: [3] * Version 3.3.0 (ruby 2.2.4-p230), codename: Jovial Platypus
2016-04-15T02:37:47.238872+00:00 app[web.1]: [3] * Min threads: 5, max threads: 5
2016-04-15T02:37:47.238880+00:00 app[web.1]: [3] * Process workers: 2
2016-04-15T02:37:47.238879+00:00 app[web.1]: [3] * Environment: production
2016-04-15T02:37:47.238880+00:00 app[web.1]: [3] * Preloading application
2016-04-15T02:37:49.185177+00:00 app[web.1]: [3] * Listening on tcp://0.0.0.0:14560
2016-04-15T02:37:49.185334+00:00 app[web.1]: [3] Use Ctrl-C to stop
2016-04-15T02:37:49.189100+00:00 app[web.1]: [3] - Worker 0 (pid: 6) booted, phase: 0
2016-04-15T02:37:49.190620+00:00 app[web.1]: [3] - Worker 1 (pid: 10) booted, phase: 0
2016-04-15T02:37:49.338111+00:00 heroku[web.1]: State changed from starting to up
2016-04-15T02:37:51.250717+00:00 heroku[router]: at=info method=GET path="/" host=vna-web.herokuapp.com request_id=69b23803-e2c4-4915-adef-d9358590c11f fwd="116.75.138.168" dyno=web.1 connect=1ms service=79ms status=500 bytes=1669
2016-04-15T02:37:51.568588+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=vna-web.herokuapp.com request_id=ff467b63-8cbc-4a5e-ab93-e8d87020cdf2 fwd="116.75.138.168" dyno=web.1 connect=1ms service=4ms status=200 bytes=143
2016-04-15T02:37:59.640100+00:00 heroku[web.1]: Restarting
2016-04-15T02:37:59.640965+00:00 heroku[web.1]: State changed from up to starting
2016-04-15T02:37:59.523049+00:00 heroku[api]: Deploy 2ffe40b by [email protected]
2016-04-15T02:37:59.523049+00:00 heroku[api]: Release v19 created by [email protected]
2016-04-15T02:37:59.706827+00:00 heroku[slug-compiler]: Slug compilation started
2016-04-15T02:37:59.706838+00:00 heroku[slug-compiler]: Slug compilation finished
2016-04-15T02:38:01.362522+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2016-04-15T02:38:01.726315+00:00 app[web.1]: [3] - Gracefully shutting down workers...
2016-04-15T02:38:01.838999+00:00 app[web.1]: [3] === puma shutdown: 2016-04-15 02:38:01 +0000 ===
2016-04-15T02:38:01.839020+00:00 app[web.1]: [3] - Goodbye!
2016-04-15T02:38:02.019288+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb`
2016-04-15T02:38:02.645079+00:00 heroku[web.1]: Process exited with status 0
2016-04-15T02:38:03.855263+00:00 app[web.1]: Puma starting in single mode...
2016-04-15T02:38:03.855304+00:00 app[web.1]: * Version 3.3.0 (ruby 2.2.4-p230), codename: Jovial Platypus
2016-04-15T02:38:03.855306+00:00 app[web.1]: * Min threads: 1, max threads: 16
2016-04-15T02:38:03.855307+00:00 app[web.1]: * Environment: production
2016-04-15T02:38:05.694384+00:00 app[web.1]: * Listening on tcp://0.0.0.0:10578
2016-04-15T02:38:05.694550+00:00 app[web.1]: Use Ctrl-C to stop
2016-04-15T02:38:05.829089+00:00 heroku[web.1]: State changed from starting to up
2016-04-15T02:38:11.021955+00:00 heroku[router]: at=info method=GET path="/" host=vna-web.herokuapp.com request_id=705c318d-1856-4378-bc8b-de9727a887c1 fwd="116.75.138.168" dyno=web.1 connect=1ms service=71ms status=500 bytes=1669
下面是Procfile
在配置web: bundle exec puma -C config/puma.rb
彪馬配置文件/ puma.rb
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['MAX_THREADS'] || 5)
threads threads_count, threads_count
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
on_worker_boot do
# Worker specific setup for Rails 4.1+
# See: https://devcenter.heroku.com/articles/deploying-rails-
# applications- with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
end
我甚至嘗試通過去除PUMA,以爲它會在使用WEBrick運行部署,但仍然美洲獅的錯誤被拋出。
錯誤ü得到什麼樣的?請張貼您的寶石文件。 – 7urkm3n
上傳你的錯誤細節。 –
用錯誤日誌更新了問題。 –