The error message when I tried to start my app 'lvmine.herokuapp.com':
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs --tail
$ heroku logs --tail -a lvmine
We got
2022-02-06T05:34:41.193073+00:00 heroku[web.1]: State changed from crashed to starting
2022-02-06T05:34:43.080374+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 17601`
2022-02-06T05:34:45.446271+00:00 app[web.1]: => Booting WEBrick
2022-02-06T05:34:45.446285+00:00 app[web.1]: => Rails 3.2.19 application starting in production on http://0.0.0.0:17601
2022-02-06T05:34:45.446285+00:00 app[web.1]: => Call with -d to detach
2022-02-06T05:34:45.446285+00:00 app[web.1]: => Ctrl-C to shutdown server
2022-02-06T05:34:45.446286+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2022-02-06T05:34:46.018783+00:00 app[web.1]: Exiting
2022-02-06T05:34:46.019530+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `initialize': SSL error: tlsv1 alert protocol version (PG::ConnectionBad)
2022-02-06T05:34:46.019531+00:00 app[web.1]: FATAL: no pg_hba.conf entry for host "44.200.80.186", user "sajwovtzpjymwu", database "d14n914sh0nmn", SSL off
Seems like SSL problem and Postgres error? I have no clues.
Can anyone help?
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
I just uploaded my ruby on rails app to heroku and I keep getting an h10 error when I try to visit any pages.
Also when I run the command 'heroku ps' it tells me it crashed and gives me this output
=== web (1X): `bin/rails server -p $PORT -e $RAILS_ENV`
web.1: crashed 2014/10/06 17:51:39 (~ 18s ago)\
I followed the tutorial here https://devcenter.heroku.com/articles/getting-started-with-rails4#local-workstation-setup
I tried running heroku logs but there really isn't anything helpful there all it says is status code 503 and code=H10
Is there a way to get a more accurate log so I can have a better idea of what is happening here?
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.
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