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

2

5

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.

Tungusic answered 6/5, 2015 at 18:45 Comment(7)
I don't see any errors, just warnings. What does heroku logs show? devcenter.heroku.com/articles/logging#log-retrievalWinna
What is the contents of your Procfile?Tradeswoman
Make sure P is capital in ProcfileUnrounded
My Procfile contains - 'web: bundle exec rails server -p $PORT'Tungusic
So if you use Thin, you need to replace rails server by thin in your ProcfileMolding
I am also getting this error - Could not detect rake tasks remote: ensure you can run $ bundle exec rake -P against your app with no environment variables present remote: and using the production group of your Gemfile. remote: rake aborted! remote: LoadError: cannot load such file -- nokogiriTungusic
What happens when you try to run bundle exec rake -P on your local? You may have an error in your rake file. You also might try rake assets:precompileWinna
M
6

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.

Molding answered 6/5, 2015 at 19:17 Comment(1)
What's the error in the Procfile there, aside from the fact it defaults to Webrick?Downs
B
1

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.

Bangle answered 14/1, 2016 at 1:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.