[英]No Procfile detected, using the default web server (webrick)
I get this error when trying to deploy my Ruby on Rails app.尝试部署我的 Ruby on Rails 应用程序时出现此错误。 Here is the error in my command line:
这是我的命令行中的错误:
###### 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
I tried following the advice in "No Procfile detected, using the default web server " [ archive.org ] - bundling the thin
gem and creating a Procfile containing:我尝试遵循“未检测到 Procfile,使用默认 Web 服务器”[ archive.org ] 中的建议 - 捆绑
thin
gem 并创建一个包含以下内容的 Procfile:
web: bundle exec thin start -p $PORT
But that didn't help.但这没有帮助。
In top of information given in comments, you have this error because in your Procfile
, you have:在评论中给出的信息之上,您有此错误,因为在您的
Procfile
,您有:
web: bundle exec rails server -p $PORT
So the default webrick
will be used.因此将使用默认的
webrick
。
In order to remove this warning, you should use an another web server like Unicorn, Thin or Puma.为了消除此警告,您应该使用其他 Web 服务器,例如 Unicorn、Thin 或 Puma。
Heroku now advocates to use Puma ( see Changelog ). Heroku 现在提倡使用 Puma(参见更新日志)。
And to getting started with Puma and Heroku, you can follow article Deploying Rails Applications with the Puma Web Server on Heroku website.要开始使用 Puma 和 Heroku,您可以在 Heroku 网站上阅读使用 Puma Web 服务器部署 Rails 应用程序一文。
In my case, I ignored Procfile in .gitignore, due to the other online guide pages.就我而言,由于其他在线指南页面,我忽略了 .gitignore 中的 Procfile。 At that time, they gave a instruction to hide files which declares environment variables containing mailer account info.
当时,他们给出了隐藏文件的指令,这些文件声明了包含邮件程序帐户信息的环境变量。 So, check your .gitignore file and remove if you see Procfile in it.
因此,请检查您的 .gitignore 文件,如果您在其中看到 Procfile,则将其删除。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.