Rails app - working fine locally but not on heroku - ruby-on-rails

I am building a simple app in Rails, everything has been working fine so far but now, after not working on it for a while, I cannot run the app in Heroku. Here are the errors I have on my logs. I would appreciate if someone could help me with these problem.
> 2016-01-07T10:25:13.640157+00:00 heroku[api]: Starting process with command `rails console` by chmorasan#gmail.com
> heroku[run.9775]: Awaiting client heroku[run.9775]: State changed from
> starting to up heroku[run.9775]: Error R13 (Attach error) -> Failed to
> a heroku[run.9775]: Process exited with status 128 heroku[run.9775]:
> State changed from up to complete heroku[run.1708]: State changed from
> starting to up
2016-01-07T09:08:52.323403+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=thecornershop.herokuapp.com request_id=469ee49d-d3a5-40bb-a6a7-f50efbfb89ef fwd="194.224.214.178" dyno= connect= service= status=503 bytes=
2016-01-07T09:08:52.788969+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=thecornershop.herokuapp.com request_id=cf2a50ed-2ef8-440a-8bc4-15be5f1f2244 fwd="194.224.214.178" dyno= connect= service= status=503 bytes=
2016-01-07T09:22:41.171885+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=thecornershop.herokuapp.com request_id=ba18bf52-9740-4e4e-b5bb-1f54dd40acb1 fwd="194.224.214.178" dyno= connect= service= status=503 bytes=
2016-01-07T09:22:41.699518+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=thecornershop.herokuapp.com request_id=babe9b0d-e6f5-4e0f-8d76-35a7217165eb fwd="194.224.214.178" dyno= connect= service= status=503 bytes=
I finally found the problem, it was somethings that I forgot to erase in a earlier mistake I did migrating, I just forgot to look in the actual db migrate. Thanks for the help.

I am not sure that which command you are trying to run on heroku, however, your log says:
heroku[run.9775]: Awaiting client heroku[run.9775]: State changed from starting to up heroku[run.9775]: Error R13 (Attach error)
Try to detach your command from terminal. Run it in the "background"
heroku run:detached <YOUR_COMMAND>
EDIT:
As you are trying to migrate your migration files:
heroku run:detached rake db:migrate

Related

Application error on deployed app on heroku

please help, i have no idea. I am getting this from my heroku logs.
i am on ruby 2.3
rails 5.1
2019-03-20T15:05:15.000000+00:00 app[api]: Build succeeded
2019-03-20T15:05:53.943996+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=aqueous-reef-51265.herokuapp.com request_id=5c0b7d49-b20e-4469-a483-88093fd77f5e fwd="41.66.199.69" dyno= connect= service= status=503 bytes= protocol=https
2019-03-20T15:05:54.781463+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=aqueous-reef-51265.herokuapp.com request_id=de8a1df2-fc24-4e69-8b36-7cb1e92a73da fwd="41.66.199.69" dyno= connect= service= status=503 bytes= protocol=https
2019-03-20T15:05:58.794279+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=aqueous-reef-51265.herokuapp.com request_id=d53446ea-a1bd-474e-ad6c-ddf62b74689f fwd="41.66.199.69" dyno= connect= service= status=503 bytes= protocol=https
2019-03-20T15:05:59.021626+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=aqueous-reef-51265.herokuapp.com request_id=63bd925f-fc04-4169-94ce-d08afd620a57 fwd="41.66.199.69" dyno= connect= service= status=503 bytes= protocol=https
^CTerminate batch job (Y/N)? y
Try to run heroku local or heroku run rails c. The first command will try to run the server locally and the second will run the rails console on your heroku server. Both of them should crash because of the error that is causing your heroku app to fail to launch, but they should provide a more detailed explanation as to the cause. I have seen this error a couple times before and one time it was because I wasn't autoloading classes correctly, i.e require 'devise in application.rb and the other time it was because there was an error in a controller class name.

Application error on Heroku on deploying rails 5 app

I'm facing the Heroku deploy error. When I deploy my rails 5 app on Heroku the following error occurs:
"An error occurred in the application and your page could not be
served. If you are the application owner, check your logs for
details".
My Heroku app logs is this
2018-01-11T11:31:08.702143+00:00 heroku[web.1]: State changed from starting to crashed
2018-01-11T11:31:08.687436+00:00 heroku[web.1]: Process exited with status 1
2018-01-11T11:31:56.372775+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=concept-car-dealer.herokuapp.com request_id=61c90fd0-3588-4f34-b463-45cc6c37e73e fwd="103.255.6.80" dyno= connect= service= status=503 bytes= protocol=https
2018-01-11T11:31:57.235468+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=concept-car-dealer.herokuapp.com request_id=0edb9bee-a765-4500-98b2-09b0826082c9 fwd="103.255.6.80" dyno= connect= service= status=503 bytes= protocol=https
2018-01-11T11:31:56.859412+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=concept-car-dealer.herokuapp.com request_id=b72c7768-541c-42db-b7f1-6f02a853fef2 fwd="103.255.6.80" dyno= connect= service= status=503 bytes= protocol=https
2018-01-11T11:31:55.750150+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=concept-car-dealer.herokuapp.com request_id=780a212f-5fa1-4143-9b26-d245acb50444 fwd="103.255.6.80" dyno= connect= service= status=503 bytes= protocol=https
Here is the link of my Heroku App . And here is the link of my GitHub repo

Heroku error on Rails app : error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=

How I can solve the error. I see build success and no error. But I am not able to see the rails app working on the link.
I see these lines in the log file :
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=myapp.herokuapp.com request_id=some_id_here fwd="47.247.8.241" dyno= connect= service= status=503 bytes= protocol=https
$heroku restart
And if it didn't work use
$heroku run rails console
will give you the details on why the app has crashed

Heroku App Always Crashes

It's now been 48 hours since my heroku app has started crashing.
I don't honestly know what is making it crash, i've tried restarting it, changing the dynos and running heroku run rake db:migrate but none of these seem to work.
These are my heroku logs
at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=serene-savannah-7550.herokuapp.com fwd="81.34.154.155" dyno= connect= service= status=503 bytes=
2013-08-27T12:51:50+00:00 app[heroku-postgres]: source=HEROKU_POSTGRESQL_BLACK measure.current_transaction=26940 measure.db_size=56841336bytes measure.tables=23 measure.active-connections=3 measure.waiting-connections=0 measure.index-cache-hit-rate=0.85317 measure.table-cache-hit-rate=0.99704
2013-08-27T12:52:45+00:00 app[heroku-postgres]: source=HEROKU_POSTGRESQL_BLACK measure.current_transaction=26940 measure.db_size=56841336bytes measure.tables=23 measure.active-connections=3 measure.waiting-connections=0 measure.index-cache-hit-rate=0.85317 measure.table-cache-hit-rate=0.99704
2013-08-27T12:53:34.027760+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=www.website.com fwd="81.34.154.155" dyno= connect= service= status=503 bytes=
2013-08-27T12:54:35.129270+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=www.website.com fwd="81.34.154.155" dyno= connect= service= status=503 bytes=
2013-08-27T12:54:36+00:00 app[heroku-postgres]: source=HEROKU_POSTGRESQL_BLACK measure.current_transaction=26940 measure.db_size=56841336bytes measure.tables=23 measure.active-connections=3 measure.waiting-connections=0 measure.index-cache-hit-rate=0.99998 measure.table-cache-hit-rate=1
2013-08-27T12:55:15.018337+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=www.website.com fwd="81.34.154.155" dyno= connect= service= status=503 bytes=
I have tried changing to 2 Dynos x1 and 1 Dyno x2 but it doesnt change anything
I have PostgreSQL Crane installed and set as my DATABASE_URL.
Why is it crashing and how could I fix this annoying error?
Thanks
It looks like your app is repeatedly crashing (but you already knew that). Have you created migrations that haven't been run, yet?
Try heroku run bundle exec rake db:migrate.
If that doesn't work, try running the Rails console on Heroku to help diagnose the issue. Run heroku run bundle exec rails console.

Heroku - Ruby On rails - Error after domain change

My app had been running for over 24 hours with no problem.
I decided to try and add a custom domain to my site. I followed the instructions and then went to my godaddy panel and changed the www from # to mysite.heroku.com
I went to sleep and when I woke up this morning I get this error
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details."
After checking the logs this is what I see
2013-03-02T10:22:24+00:00 heroku[web.1]: Process exited with status 1
2013-03-02T10:22:24+00:00 heroku[web.1]: State changed from starting to crashed
2013-03-02T10:22:25+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=vauxden.herokuapp.com fwd="176.251.155.165" dyno= queue= wait= connect= service= status=503 bytes=
2013-03-02T10:22:26+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=vauxden.herokuapp.com fwd="176.251.155.165" dyno= queue= wait= connect= service= status=503 bytes=
2013-03-02T10:22:39+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=vauxden.herokuapp.com fwd="176.251.155.165" dyno= queue= wait= connect= service= status=503 bytes=
2013-03-02T10:22:39+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=vauxden.herokuapp.com fwd="176.251.155.165" dyno= queue= wait= connect= service= status=503 bytes=
I am fairly new to ruby on rails and heroku so I have no idea how to fix this error.
I also deleted the custom domain and changed everything back to normal in my godaddy panel yet I still get this error.
I tried to push the newest version of my code and that did not make any difference.
Did you execute heroku run rake db:migrate after deploying your app?
GoDaddy can be a pain in the ass, and I second what dev said above^. It can take a day or two to load properly, so looking for the source of the problem on that end can be unreliable.
Check to make sure everythings running correctly on Heroku's side for your app.
Heroku's Status looks OK, https://status.heroku.com/.
Your app hasn't crashed when locally testing has it? http:// localhost:3000/whatever
Check your gems, others seem to have a similar issue. link

Resources