简体   繁体   中英

No Procfile detected, using the default web server (webrick)

I get this error when trying to deploy my Ruby on Rails app. 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:

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:

web: bundle exec rails server -p $PORT

So the default webrick will be used.

In order to remove this warning, you should use an another web server like Unicorn, Thin or Puma.

Heroku now advocates to use Puma ( see Changelog ).

And to getting started with Puma and Heroku, you can follow article Deploying Rails Applications with the Puma Web Server on Heroku website.

In my case, I ignored Procfile in .gitignore, due to the other online guide pages. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM