在尝试部署我的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"中的建议。但那没有用。
答案 0 :(得分:6)
在评论中提供的信息之外,您有此错误,因为在您的Procfile
中,您有:
web: bundle exec rails server -p $PORT
因此将使用默认的webrick
。
要删除此警告,您应使用其他Web服务器,如Unicorn,Thin或Puma。
Heroku现在主张使用Puma(见Changelog)。
要开始使用Puma和Heroku,您可以在Heroku网站上关注文章Deploying Rails Applications with the Puma Web Server。
答案 1 :(得分:1)
就我而言,由于其他在线指南页面,我忽略了.gitignore中的Procfile。那时,他们给出了隐藏文件的指令,这些文件声明了包含邮件程序帐户信息的环境变量。 因此,检查.gitignore文件,如果在其中看到Procfile则删除。