Heroku app crashes, but logs don't display error? - ruby-on-rails

I looked at the other similar questions, and none of the solutions worked for me.
I'm using rails, ruby > 2.2. I precompiled my assests beforehand, and followed the steps on the heroku website for deployment.
Heroku restart or Heroku open yields the following logs
T13:23:51.140722+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=tranquil-reef-67177.herokuapp.com request_id=ddb61e34-f755-4c7b-b6e7-fbb7d2d2c545 fwd="99.99.45.37" dyno= connect= service= status=503 bytes= protocol=https
2017-08-16T13:26:09.989021+00:00 heroku[web.1]: State changed from crashed to starting 2017-08-16T13:26:12.914632+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 16431 -e production` 2017-08-16T13:26:18.084985+00:00 heroku[web.1]: Process exited with status 1
2017-08-16T13:26:17.981060+00:00 app[web.1]: 2017-08-16T13:26:17.981072+00:00 app[web.1]:
2017-08-16T13:26:17.981118+00:00 app[web.1]: >>>> A cacert.pem bundle could not be downloaded. 2017-08-16T13:26:17.981452+00:00 app[web.1]: => Booting Puma
2017-08-16T13:26:17.981454+00:00 app[web.1]: => Run `rails server -h` for more startup options 2017-08-16T13:26:17.981454+00:00 app[web.1]: => Rails 5.1.3 application starting in production on http://0.0.0.0:16431 2017-08-16T13:26:17.981457+00:00 app[web.1]: Exiting
2017-08-16T13:26:18.097040+00:00 heroku[web.1]: State changed from starting to crashed 2017-08-16T13:28:52.442323+00:00 app[api]: Starting process with command `bundle exec rake db:setup` by user smantri7#gatech.edu 2017-08-16T13:28:58.768622+00:00 heroku[run.9307]: Awaiting client
2017-08-16T13:28:58.793376+00:00 heroku[run.9307]: Starting process with command `bundle exec rake db:setup`
2017-08-16T13:28:58.977883+00:00 heroku[run.9307]: State changed from starting to up 2017-08-16T13:29:06.107123+00:00 heroku[run.9307]: State changed from up to complete
2017-08-16T13:29:06.088150+00:00 heroku[run.9307]: Process exited with status 1 2017-08-16T13:29:25.187872+00:00 heroku[run.6090]: Awaiting client
2017-08-16T13:29:25.261306+00:00 heroku[run.6090]: Starting process with command `bundle exec rake db:create`
2017-08-16T13:29:25.463655+00:00 heroku[run.6090]: State changed from starting to up 2017-08-16T13:29:21.565730+00:00 app[api]: Starting process with command `bundle exec rake db:create` by user smantri7#gatech.edu
2017-08-16T13:29:33.024076+00:00 heroku[run.6090]: State changed from up to complete
2017-08-16T13:29:33.008825+00:00 heroku[run.6090]: Process exited with status 1
2017-08-16T13:31:57.967030+00:00 app[api]: Starting process with command `bundle exec rake db:push` by user smantri7#gatech.edu
2017-08-16T13:32:01.731122+00:00 heroku[run.8862]: Awaiting client
2017-08-16T13:32:01.787259+00:00 heroku[run.8862]: Starting process with command `bundle exec rake db:push`
2017-08-16T13:32:01.976994+00:00 heroku[run.8862]: State changed from starting to up
2017-08-16T13:32:09.014212+00:00 heroku[run.8862]: State changed from up to complete
2017-08-16T13:32:08.996819+00:00 heroku[run.8862]: Process exited with status 1 2017-08-16T13:33:08.827762+00:00 heroku[web.1]: State changed from crashed to starting
2017-08-16T13:33:12.246286+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 40298 -e production`

The problem is here: >>>> A cacert.pem bundle could not be downloaded. You need to check an issue with cacert.pem

Related

Debugging Heroku using logs

React frontend with rails backend. Deploying with NPM. Deployed successfully but failing to fetch with this error--
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/users"
There's no information in the logs about what crashed it ends with:
2020-06-19T01:21:42.298326+00:00 heroku[web.1]: Process exited with status 1
2020-06-19T01:21:42.342497+00:00 heroku[web.1]: State changed from starting to crashed
I get this warning when pushing to heroku
remote: Detecting rails configuration failed
remote: set HEROKU_DEBUG_RAILS_RUNNER=1 to debug
I've been googling this all day and can not find a solution. What I can gather is that it just isn't connecting to the postgres db. How do I debug this?
You can actually ssh into the heroku using the heroku-cli instance to try to start rails server on your own.
or look into the log folder.
heroku ps:exec -a your-app-name

rails heroku - error code H10 bash: bin/rails: No such file or directory

I am trying to follow Michael Hartl's rails tutorial adding authentication step 7.29 (http://ruby.railstutorial.org/chapters/sign-up#top). My project works locally but I get "an error occurred in the application and your page could not be served" when I try deploying to heroku. These are my log errors:
heroku[api]: Starting process with command `bundle exec rake db:migrate` by connorleech#gmail.com
heroku[run.1285]: Awaiting client
heroku[run.1285]: Starting process with command `bundle exec rake db:migrate`
heroku[run.1285]: State changed from starting to up
heroku[run.1285]: Process exited with status 0
heroku[run.1285]: State changed from up to complete
heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=jason-shark-rails-project.herokuapp.com fwd="41.74.174.50" dyno= connect= service= status=503 bytes=
heroku[web.1]: State changed from crashed to starting
heroku[web.1]: Starting process with command `bin/rails server -p 10431 -e $RAILS_ENV`
app[web.1]: bash: bin/rails: No such file or directory
heroku[web.1]: Process exited with status 127
heroku[web.1]: State changed from starting to crashed
heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
heroku[web.1]: Stopping process with SIGKILL
It seems I may be missing something in my project in order to deploy it.. bash: bin/rails: No such file or directory
Why does my app work locally but not deploy to heroku?
Rails 4 project had a /bin directory, unlike some older Rails 3 projects I had cloned. /bin contains 3 files, bundle, rails, and rake, but these weren't making it to Heroku because I had bin in my global .gitignore file.
This is a pretty common ignore rule if you work with Git and other languages (Java, etc.), so to fix this:
Remove bin from ~/.gitignore
Run bundle install
Commit your
changes with git add . and git commit -m "Add bin back"
Push your changes to Heroku with git push heroku master
I had a similar problem, for some reason the /bin folder was not copying to my GitHub repo (check yours?). After trying many other solutions unsuccessfully, I ran git add bin and that let me push the bin folder to GitHub. I'm still unsure why I had to make this exception for the bin folder specifically. Running Ruby v2, Rails v4, on Linux.

Heroku 'no such app' with no errors

I'm having the hardest time trying to deploy a rails app to Heroku.
I push the app to it and receive no errors, but when I try to access it, I receive a 'no such app' message and I can't find out why.
I've followed this steps:
1) Cloned the git repo (https://github.com/mquan/lavish) in my local machine.
2) Changed the gemfile adding a newer version of the jquery-rails (as I was receiving an error) and added the 'thin' gem as stated at heroku documentation.
3) Installed it locally and it worked (in fact, it works if I run server rails, but not if I run server rails -e production).
4) Pushed it to heroku with no errors. (I tryed to precompile the assets too to see if I had any change).
5) When I visit the page (heroku open) I receive the 'No such app' message.
As I'm absolutely new to heroku and rails, I'm just clueless about what is happening.
Thanks a ton!
Edit
The log looks like this:
2012-11-14T06:36:28+00:00 heroku[web.1]: State changed from starting to down
2012-11-14T06:36:30+00:00 heroku[web.1]: Starting process with command `bundle exec rails server thin -p 59071`
2012-11-14T06:36:35+00:00 app[web.1]: => Call with -d to detach
2012-11-14T06:36:35+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-11-14T06:36:35+00:00 app[web.1]: => Booting Thin
2012-11-14T06:36:35+00:00 app[web.1]: => Rails 3.2.0 application starting in production on http:// 0.0.0.0:59071
2012-11-14T06:36:35+00:00 app[web.1]: >> Thin web server (v1.5.0 codename Knife)
2012-11-14T06:36:35+00:00 app[web.1]: >> Maximum connections set to 1024
2012-11-14T06:36:35+00:00 app[web.1]: >> Listening on 0.0.0.0:59071, CTRL+C to stop
2012-11-14T06:36:39+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2012-11-14T06:36:40+00:00 app[web.1]: Exiting
2012-11-14T06:36:41+00:00 heroku[web.1]: Process exited with status 0
2012-11-14T20:00:11+00:00 heroku[slugc]: Slug compilation started
2012-11-14T20:01:58+00:00 heroku[slugc]: Slug compilation finished
2012-11-14T20:03:24+00:00 heroku[web.1]: Unidling
2012-11-14T20:03:24+00:00 heroku[web.1]: State changed from down to starting
2012-11-14T20:03:35+00:00 heroku[web.1]: State changed from starting to up
2012-11-14T20:03:37+00:00 heroku[router]: at=info method=GET path=/ host=blooming-castle-2034.herokuapp.com fwd= dyno=web.1 queue=0 wait=0ms connect=13ms service=909ms status=301 bytes=14
From looking at the code for Lavish, it looks like there is an initializer file that is loaded on Rails boot that redirects all non-www domain requests to www. Heroku wont work with the www prefix before your Heroku app url.
Here is a link to the file that should be removed
As a disclaimer, I'm not sure if this will have adverse effects on the Lavish application, since I've never dealt with it before.

Heroku cedar doesn't upgrade to ruby-1.9.3

Trying to port Heroku cedar from Ruby 1.9.2 to Ruby 1.9.3 fails :
2012-07-25T22:09:48+00:00 heroku[slugc]: Slug compilation started
2012-07-25T22:11:23+00:00 heroku[api]: Deploy abdaf18 by luca.soave#gmail.com
2012-07-25T22:11:23+00:00 heroku[api]: Release v244 created by luca.soave#gmail.com
2012-07-25T22:11:23+00:00 heroku[web.1]: State changed from up to starting
2012-07-25T22:11:24+00:00 heroku[deployhooks]: Notified New Relic about the deploy
2012-07-25T22:11:24+00:00 heroku[slugc]: Slug compilation finished
2012-07-25T22:11:26+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2012-07-25T22:11:27+00:00 app[web.1]: Exiting
2012-07-25T22:11:28+00:00 heroku[web.1]: Process exited with status 0
2012-07-25T22:11:28+00:00 heroku[web.1]: Starting process with command `bundle exec rails server thin -p 12558`
2012-07-25T22:11:29+00:00 app[web.1]: Your Ruby version is 1.9.2, but your Gemfile specified 1.9.3
2012-07-25T22:11:30+00:00 heroku[web.1]: Process exited with status 18
2012-07-25T22:11:30+00:00 heroku[web.1]: State changed from starting to crashed
2012-07-25T22:11:30+00:00 heroku[web.1]: State changed from crashed to starting
2012-07-25T22:11:36+00:00 heroku[web.1]: Starting process with command `bundle exec rails server thin -p 36407`
2012-07-25T22:11:37+00:00 app[web.1]: Your Ruby version is 1.9.2, but your Gemfile specified 1.9.3
2012-07-25T22:11:39+00:00 heroku[web.1]: Process exited with status 18
2012-07-25T22:11:39+00:00 heroku[web.1]: State changed from starting to crashed
2012-07-25T22:11:40+00:00 heroku[router]: Error H10 (App crashed) -> GET gitwatcher.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-07-25T22:11:41+00:00 heroku[router]: Error H10 (App crashed) -> GET gitwatcher.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
2012-07-25T22:11:41+00:00 heroku[router]: Error H10 (App crashed) -> GET gitwatcher.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
UPDATE
I followed Heroku docs by having
ruby '1.9.3'
into my Gemfile and bundler --pre :
lsoave#ubuntu:~/rails/github/gitwatcher$ gem list bundler
*** LOCAL GEMS ***
bundler (1.2.0.pre.1, 1.1.4)
lsoave#ubuntu:~/rails/github/gitwatcher$
UPDATE
I follwed heroku suggestion: If absent or not the first entry, add bin: to the config with heroku config:add. but it doesn't work :
lsoave#ubuntu:~/rails/github/gitwatcher$ heroku config -s | grep PATH
GEM_PATH=vendor/bundle/ruby/1.9.1
PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
lsoave#ubuntu:~/rails/github/gitwatcher$
... this is strange because running ruby -v in the console give back the corret version :
lsoave#ubuntu:~/rails/github/gitwatcher$ heroku run:detached "ruby -v"
Running `ruby -v` detached... up, run.1
Use `heroku logs -p run.1` to view the output.
lsoave#ubuntu:~/rails/github/gitwatcher$ heroku logs -p run.1
2012-07-25T22:51:57+00:00 heroku[run.1]: Starting process with command `ruby -v`
2012-07-25T22:51:57+00:00 app[run.1]: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
2012-07-25T22:51:57+00:00 heroku[run.1]: State changed from starting to complete
2012-07-25T22:51:58+00:00 heroku[run.1]: Process exited with status 0
lsoave#ubuntu:~/rails/github/gitwatcher$
UPDATE
... moreover I did :
heroku config:add RUBY_VERSION=ruby-1.9.3-p194
heroku config:add PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
recompile ( change + git commit + git push heroku +master )
but nothing, it crash after recompilation this way :
2012-07-25T23:18:47+00:00 heroku[router]: Error H10 (App crashed) -> GET gitwatcher.com/ dyno= queue= wait= service= status=503 bytes=
2012-07-25T23:18:47+00:00 heroku[nginx]: 93.34.152.105 - - [25/Jul/2012:23:18:47 +0000] "GET / HTTP/1.1" 503 601 "-" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1" gitwatcher.com
UPDATE
Opened Heroku Call Request #58410
It was not a ruby version problem, infact I notice the following error during heroku compilation, even if it didn't block the deploy and the push completed without other problems :
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
Invalid CSS after "...nd-image:url(""": expected ")", was "/assets/twitter..."
(in /tmp/build_19ypab978ku1z/app/assets/stylesheets/application.css)
Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
Precompiling assets failed, enabling runtime asset compilation
Injecting rails31_enable_runtime_asset_compilation
Please see this article for troubleshooting help:
http://devcenter.heroku.com/articles/rails31_heroku_cedar#troubleshooting
then looking better into heroku logs, I also see this one :
psych/syntax_error.rb:5:in 'initialize': wrong number of arguments (1 for 6) (ArgumentError)
and googling it turns out something similar, I tried and it works !
2012-07-25T22:11:29+00:00 app[web.1]: Your Ruby version is 1.9.2, but your Gemfile specified 1.9.3
https://devcenter.heroku.com/articles/ruby-versions

Heroku problem : The page you were looking for doesn't exist

I have followed book until chapter 5 finished and it's working OK in my linux workstation
when I push to Heroku, all data pushed correctly but when I try to open Heroku (http://vivid-sky-685.heroku.com)
I get a 404 message.
The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.
Below is my Gemfile for application
source 'http://rubygems.org'
gem 'rails', '3.0.5'
gem 'sqlite3'
group :development do
gem 'rspec-rails', '2.5.0'
end
group :test do
gem 'rspec', '2.5.0'
gem 'webrat', '0.7.1'
gem 'spork', '0.9.0.rc4'
end
gem 'rake','~> 0.8.7'
Any ideas what could be going wrong?
#odin here is my heroku logs , thanks
2011-09-11T10:41:57+00:00 heroku[router]: GET vivid-sky-685.heroku.com/y dyno=web.1 queue=0 wait=0ms service=5ms status=404 bytes=728
2011-09-11T10:41:57+00:00 app[web.1]:
2011-09-11T10:41:57+00:00 app[web.1]:
2011-09-11T10:41:57+00:00 app[web.1]: Started GET "/y" for 93.186.31.80 at 2011-09-11 03:41:57 -0700
2011-09-11T10:41:57+00:00 app[web.1]:
2011-09-11T10:41:57+00:00 app[web.1]: ActionController::RoutingError (No route matches "/y"):
2011-09-11T10:41:57+00:00 app[web.1]:
2011-09-11T10:41:57+00:00 app[web.1]:
2011-09-11T10:41:57+00:00 app[web.1]:
2011-09-11T10:41:57+00:00 heroku[nginx]: 93.186.31.80 - - [11/Sep/2011:03:41:57 -0700] "GET /y HTTP/1.1" 404 728 "-" "Mozilla/5.0 (BlackBerry; U; BlackBerry 9300; en) AppleWebKit/534.8+ (KHTML, like Gecko) Version/6.0.0.546 Mobile Safari/534.8+" vivid-sky-685.heroku.com
2011-09-11T11:45:28+00:00 heroku[web.1]: Idl
2011-09-11T11:45:29+00:00 heroku[web.1]: State changed from up to down
2011-09-11T11:45:29+00:00 heroku[web.1]: State changed from down to created
2011-09-11T11:45:29+00:00 heroku[web.1]: State changed from created to starting
2011-09-11T11:45:30+00:00 heroku[web.1]: Stopping process with SIGTERM
2011-09-11T11:45:30+00:00 app[web.1]: >> Stopping ...
2011-09-11T11:45:30+00:00 heroku[web.1]: Process exited
2011-09-11T11:45:30+00:00 heroku[web.1]: Starting process with command `thin -p 16738 -e production -R /home/heroku_rack/heroku.ru start`
2011-09-11T11:45:33+00:00 app[web.1]: >> Thin web server (v1.2.6 codename Crazy Delicious)
2011-09-11T11:45:33+00:00 app[web.1]: >> Maximum connections set to 1024
2011-09-11T11:45:33+00:00 app[web.1]: >> Listening on 0.0.0.0:16738, CTRL+C to stop
2011-09-11T11:45:33+00:00 heroku[web.1]: State changed from starting to up
2011-09-11T12:53:00+00:00 heroku[web.1]: Idling
2011-09-11T12:53:01+00:00 heroku[web.1]: State changed from up to down
2011-09-11T12:53:02+00:00 heroku[web.1]: Stopping process with SIGTERM
2011-09-11T12:53:02+00:00 app[web.1]: >> Stopping ...
2011-09-11T12:53:02+00:00 heroku[web.1]: Process exited
2011-09-11T13:18:21+00:00 heroku[rake.1]: State changed from created to starting
2011-09-11T13:18:23+00:00 app[rake.1]: Awaiting client
2011-09-11T13:18:23+00:00 app[rake.1]: Starting process with command `bundle exec rake db:migrate`
2011-09-11T13:18:26+00:00 heroku[rake.1]: Process exited
2011-09-11T13:18:26+00:00 heroku[rake.1]: State changed from up to complete
2011-09-11T13:20:02+00:00 heroku[web.1]: Unidling
2011-09-11T13:20:02+00:00 heroku[web.1]: State changed from down to created
2011-09-11T13:20:02+00:00 heroku[web.1]: State changed from created to starting
2011-09-11T13:20:04+00:00 heroku[web.1]: Starting process with command `thin -p 48393 -e production -R /home/heroku_rack/heroku.ru start`
2011-09-11T13:20:06+00:00 app[web.1]: >> Thin web server (v1.2.6 codename Crazy Delicious)
2011-09-11T13:20:06+00:00 app[web.1]: >> Maximum connections set to 1024
2011-09-11T13:20:06+00:00 app[web.1]: >> Listening on 0.0.0.0:48393, CTRL+C to stop
2011-09-11T13:20:07+00:00 heroku[web.1]: State changed from starting to up
2011-09-11T13:20:07+00:00 app[web.1]:
2011-09-11T13:20:07+00:00 app[web.1]:
2011-09-11T13:20:07+00:00 app[web.1]: Started GET "/" for 118.137.144.220 at 2011-09-11 06:20:07 -0700
2011-09-11T13:20:08+00:00 app[web.1]:
2011-09-11T13:20:08+00:00 app[web.1]: ActionController::RoutingError (uninitialized constant PagesController):
2011-09-11T13:20:08+00:00 app[web.1]:
2011-09-11T13:20:08+00:00 app[web.1]:
2011-09-11T13:20:08+00:00 app[web.1]:
2011-09-11T13:20:08+00:00 heroku[router]: GET vivid-sky-685.heroku.com/ dyno=web.1 queue=0 wait=0ms service=403ms status=404 bytes=728
2011-09-11T13:20:08+00:00 heroku[nginx]: 118.137.144.220 - - [11/Sep/2011:06:20:08 -0700] "GET / HTTP/1.1" 404 728 "-" "Mozilla/5.0 (X11; Linux i686; rv:2.0) Gecko/20100101 Firefox/4.0" vivid-sky-685.heroku.com
I know it's an old problem but I ran into it too. I realized I didn't change the root route in config/routes.rb before pushing. Not changing it might result in a welcome page locally, but on heroku it will get the above error.
I got the same problem; however, after changing 1 line code of production.rb located in config/environments/production.rb from
config.assets.compile = false
to
config.assets.compile = true
commit the new change. Then my sample app works fine on heroku
I'm using postgresql, and I also had page not showing up on heroku.
This command fixed it:
heroku run rake db:setup
and then
heroku rake db:migrate
I had migrated before, but hadn't done the setup first.
I also had tried setting
config.assets.compile = true
in production.rb, but that made no difference.
Have you tried running in production mode locally? Try rails server -e production and see if you get the same error, which you can then debug. Also make sure you've done heroku rake db:migrate.
In my case it was a missing starting page that did not cause a problem in development mode but did cause the above issue on heroku. The accepted answer on this thread sheds more light.
Ran into this problem as well. Solved it by setting a root route. In my case, root 'pages#home' in config/routes.rb
If the root route is not set, you are redirected to localhost:3000. Hence,
The page you were looking for doesn't exist. You may have mistyped the
address or the page may have moved.
1. Always set a root in routes. That's rails 101
I wouldn't go for making asset pre-compilation false all the time. For production app I feel it enhances the overall speed if assets have been pre-compiled.
2. As a rule of thumb I always run rake assets:precompile before pushing to git. Please try it. and then commit to git repository and then heroku. Do heroku restart
3. Another cause could be heroku rake db:migrate, please check if you did it
4. Also this is my Gemfile setup for the development and production groups
group :development do
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
gem 'heroku-deflater'
end
I had a very similiar issue with heroku, found the answer from this question:
RefineryCMS routes for Home page doesn't work
To save you reading, the solution was to update "Home" using Advanced Options, there is a question:
"Forward this page to another website or page"
Fill this in with a / and it should work. This sounds a little backwards, as its actually setting /my_page to redirect to "/". But the way to think of it is:
Refinery pages extension is looking for a page with the url '/' to be
the home page. So by telling the page titled "Home" that you want it
to have the url '/' you're setting it as the definitive homepage as
far as Refinery pages extension is concerned.
(quote from #Philip Arndt)
So I had to run in this order and it worked for me
$ heroku rake db:migrate
$ heroku run rake db:setup
Specify Ruby version in app
Rails 5 requires Ruby 2.2.0 or above. Heroku has a recent version of Ruby installed by default, however you can specify an exact version by using the ruby DSL in your Gemfile.
At the end of Gemfile add:
ruby "2.4.1"
I had the same problem, but the thing is that the app is missing the home like root. The default home page for Heroku is this HTMLthe default page. But if you try all your defined routes they will work like:
appname.herokuapp.com/route
I got the same error but realized that I hadn't change the HTML verb from GET to ROOT in config/routes.rb file.
It was get "/hello", to: "application#hello"
I updated it to root "application#hello"
I then pushed it to git and deployed it to production.
I was facing the same error because I pushed same non-master branch to heroku master using this command git push heroku master . Which obviously cause conflicts.
I also checked the routes using heroku run rake routes. But the output was not my actual routes. Not even single one.
The proper way to push your non-master branch to heroku master is
git push -f heroku your_branch_name:master

Resources