我在尝试部署我的 Ruby on Rails 应用程序时遇到此错误。这是我的命令行中的错误:
###### WARNING:
remote: No Procfile detected, using the default web server (webrick)
remote: https://devcenter.heroku.com/articles/ruby-default-web-server
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for Ruby -> console, rake, web, worker
remote:
remote: -----> Compressing... done, 29.5MB
remote: -----> Launching... done, v21
remote: https://agile-sea-1900.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/agile-sea-1900.git
e5d3ad8..975d5eb master -> master
我尝试遵循“No Procfile detected, using the default web server”中的建议 [ archive.org ] - 捆绑 thin
gem 并创建包含以下内容的 Procfile:
web: bundle exec thin start -p $PORT
但这并没有帮助。
最佳答案
在评论中给出的信息之上,您有此错误是因为在您的 Procfile
中,您有:
web: bundle exec rails server -p $PORT
因此将使用默认的 webrick
。
为了消除此警告,您应该使用另一个 Web 服务器,例如 Unicorn、Thin 或 Puma。
Heroku 现在提倡使用 Puma(参见 Changelog)。
要开始使用 Puma 和 Heroku,您可以关注文章 Deploying Rails Applications with the Puma Web Server在 Heroku 网站上。
关于ruby-on-rails - 未检测到 Procfile,使用默认 Web 服务器 (webrick),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30085101/