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.

mwfearnley
  • 3,303
  • 2
  • 34
  • 35
Mark Shakespeare
  • 115
  • 1
  • 3
  • 9
  • 1
    I don't see any errors, just warnings. What does `heroku logs` show? https://devcenter.heroku.com/articles/logging#log-retrieval – Marc K May 06 '15 at 18:50
  • 2
    What is the contents of your `Procfile`? – infused May 06 '15 at 18:51
  • 1
    Make sure P is capital in Procfile – Ahmad Al-kheat May 06 '15 at 18:56
  • 1
    My Procfile contains - 'web: bundle exec rails server -p $PORT' – Mark Shakespeare May 06 '15 at 19:03
  • So if you use `Thin`, you need to replace `rails server` by `thin` in your `Procfile` – Florent Ferry May 06 '15 at 19:06
  • 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 -- nokogiri – Mark Shakespeare May 06 '15 at 19:06
  • 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:precompile` – Marc K May 06 '15 at 22:55

2 Answers2

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.

Florent Ferry
  • 1,397
  • 1
  • 10
  • 21
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.

casamia
  • 619
  • 1
  • 10
  • 19