Error: Cannot find module 'express-session' when deploying to Heroku - ruby-on-rails

I am a beginner and I am trying to deploy my node app to Heroku.
From what I understand in the log below Heroku has trouble reading the express-session dependency.
So I checked my package.json file and it wasn't in there, even though it was 'requiring' it in my app.js file. It also has been running just fine locally with nodemon without express-session.
Assuming that this may cause the error message I added 'express-session' in the dependencies.
Then I ran in the CL npm install express-session, npm install, git add. & git commit and then pushed it back to Heroku.
Yet, the same error still shows up.
These are my dependencies:
{
"name": "simplyfly",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"bcrypt": "^0.8.2",
"body-parser": "^1.12.2",
"ejs": "^2.3.1",
"express": "^4.12.3",
"method-override": "^2.3.2",
"pg": "^4.3.0",
"pg-hstore": "^2.3.2",
"request": "^2.55.0",
"sequelize": "^2.0.5",
"sequelize-cli": "^1.7.0",
"cool-ascii-faces": "~1.3.x",
"express-session": "^1.7.6"
}
}
And here is my log:
2015-06-15T20:13:20.488264+00:00 app[web.1]: at Module.load (module.js:355:32)
2015-06-15T20:13:20.488268+00:00 app[web.1]: at Function.Module.runMain (module.js:501:10)
2015-06-15T20:13:20.488265+00:00 app[web.1]: at Function.Module._load (module.js:310:12)
2015-06-15T20:13:21.385482+00:00 heroku[web.1]: Process exited with status 1
2015-06-15T20:13:21.421482+00:00 heroku[web.1]: State changed from starting to crashed
2015-06-15T20:13:33.850256+00:00 heroku[api]: Scale to web=1 by c.kazbour#gmail.com
2015-06-15T20:13:42.056575+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simplifly.herokuapp.com request_id=cbef7e0e-24cb-45f1-9934-7a326a514ed4 fwd="50.141.68.137" dyno= connect= service= status=503 bytes=
2015-06-15T20:13:48.199162+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simplifly.herokuapp.com request_id=7ba21844-6623-4d9c-af76-ffa60cad4fbd fwd="50.141.68.137" dyno= connect= service= status=503 bytes=
2015-06-15T20:26:58.464510+00:00 heroku[api]: Deploy 36f1770 by c.kazbour#gmail.com
2015-06-15T20:26:58.464510+00:00 heroku[api]: Release v4 created by c.kazbour#gmail.com
2015-06-15T20:26:58.548710+00:00 heroku[web.1]: State changed from crashed to starting
2015-06-15T20:26:58.512202+00:00 heroku[slug-compiler]: Slug compilation started
2015-06-15T20:26:58.512230+00:00 heroku[slug-compiler]: Slug compilation finished
2015-06-15T20:27:02.685211+00:00 heroku[web.1]: Starting process with command `node app.js`
2015-06-15T20:27:04.742124+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-06-15T20:27:04.742151+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-06-15T20:27:05.295237+00:00 app[web.1]: module.js:338
2015-06-15T20:27:05.295241+00:00 app[web.1]: throw err;
2015-06-15T20:27:05.295242+00:00 app[web.1]: ^
2015-06-15T20:27:05.295244+00:00 app[web.1]: Error: Cannot find module 'express-session'
2015-06-15T20:27:05.295247+00:00 app[web.1]: at Function.Module._load (module.js:278:25)
2015-06-15T20:27:05.295246+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:336:15)
2015-06-15T20:27:05.295248+00:00 app[web.1]: at Module.require (module.js:365:17)
2015-06-15T20:27:05.295250+00:00 app[web.1]: at require (module.js:384:17)
2015-06-15T20:27:05.295251+00:00 app[web.1]: at Object.<anonymous> (/app/app.js:11:15)
2015-06-15T20:27:05.295253+00:00 app[web.1]: at Module._compile (module.js:460:26)
2015-06-15T20:27:05.295255+00:00 app[web.1]: at Object.Module._extensions..js (module.js:478:10)
2015-06-15T20:27:05.295257+00:00 app[web.1]: at Function.Module._load (module.js:310:12)
2015-06-15T20:27:05.295256+00:00 app[web.1]: at Module.load (module.js:355:32)
2015-06-15T20:27:05.295259+00:00 app[web.1]: at Function.Module.runMain (module.js:501:10)
2015-06-15T20:27:06.155893+00:00 heroku[web.1]: State changed from starting to crashed
2015-06-15T20:27:06.156698+00:00 heroku[web.1]: State changed from crashed to starting
2015-06-15T20:27:06.140225+00:00 heroku[web.1]: Process exited with status 1
2015-06-15T20:27:09.292073+00:00 heroku[web.1]: Starting process with command `node app.js`
2015-06-15T20:27:11.100911+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-06-15T20:27:11.100933+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-06-15T20:27:11.975393+00:00 app[web.1]: module.js:338
2015-06-15T20:27:11.975397+00:00 app[web.1]: throw err;
2015-06-15T20:27:11.975399+00:00 app[web.1]: ^
2015-06-15T20:27:11.975401+00:00 app[web.1]: Error: Cannot find module 'express-session'
2015-06-15T20:27:11.975402+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:336:15)
2015-06-15T20:27:11.975404+00:00 app[web.1]: at Function.Module._load (module.js:278:25)
2015-06-15T20:27:11.975405+00:00 app[web.1]: at Module.require (module.js:365:17)
2015-06-15T20:27:11.975408+00:00 app[web.1]: at Object.<anonymous> (/app/app.js:11:15)
2015-06-15T20:27:11.975407+00:00 app[web.1]: at require (module.js:384:17)
2015-06-15T20:27:11.975410+00:00 app[web.1]: at Module._compile (module.js:460:26)
2015-06-15T20:27:11.975411+00:00 app[web.1]: at Object.Module._extensions..js (module.js:478:10)
2015-06-15T20:27:11.975412+00:00 app[web.1]: at Module.load (module.js:355:32)
2015-06-15T20:27:11.975414+00:00 app[web.1]: at Function.Module._load (module.js:310:12)
2015-06-15T20:27:11.975415+00:00 app[web.1]: at Function.Module.runMain (module.js:501:10)
2015-06-15T20:27:13.067329+00:00 heroku[web.1]: State changed from starting to crashed
2015-06-15T20:27:13.052249+00:00 heroku[web.1]: Process exited with status 1
2015-06-15T20:27:19.506077+00:00 heroku[api]: Scale to web=1 by c.kazbour#gmail.com
2015-06-15T20:27:46.543780+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simplifly.herokuapp.com request_id=3df4bc96-feb7-48c6-a52b-ded903ae154e fwd="50.141.68.137" dyno= connect= service= status=503 bytes=
2015-06-15T20:34:06.988969+00:00 heroku[slug-compiler]: Slug compilation started
2015-06-15T20:34:06.988997+00:00 heroku[slug-compiler]: Slug compilation finished
2015-06-15T20:34:06.911574+00:00 heroku[api]: Deploy d8ce9d8 by c.kazbour#gmail.com
2015-06-15T20:34:06.911574+00:00 heroku[api]: Release v5 created by c.kazbour#gmail.com
2015-06-15T20:34:07.186442+00:00 heroku[web.1]: State changed from crashed to starting
2015-06-15T20:34:09.816487+00:00 heroku[web.1]: Starting process with command `node app.js`
2015-06-15T20:34:11.760020+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-06-15T20:34:11.760047+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-06-15T20:34:12.637513+00:00 app[web.1]: I'm listening
2015-06-15T20:34:27.737044+00:00 heroku[api]: Scale to web=1 by c.kazbour#gmail.com
2015-06-15T20:35:10.211701+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2015-06-15T20:35:10.211701+00:00 heroku[web.1]: Stopping process with SIGKILL
2015-06-15T20:35:11.059387+00:00 heroku[web.1]: State changed from starting to crashed
2015-06-15T20:35:11.047891+00:00 heroku[web.1]: Process exited with status 137
2015-06-15T20:35:49.365371+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simplifly.herokuapp.com request_id=596720e4-470d-4c1b-9beb-88830c2530b4 fwd="50.141.68.137" dyno= connect= service= status=503 bytes=
2015-06-15T20:35:54.100625+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simplifly.herokuapp.com request_id=3304c0b0-4ea8-4b4c-9b15-68018303143a fwd="50.141.68.137" dyno= connect= service= status=503 bytes=
2015-06-15T20:35:59.738039+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simplifly.herokuapp.com request_id=f0c96f6c-e017-443b-b3fc-c470ea172b09 fwd="50.141.68.137" dyno= connect= service= status=503 bytes=
2015-06-15T20:35:56.928372+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simplifly.herokuapp.com request_id=bd37d2d7-4e40-4a83-ae4c-c4bb8d77ebab fwd="50.141.68.137" dyno= connect= service= status=503 bytes=
2015-06-15T20:47:13.464465+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simplifly.herokuapp.com request_id=11dae041-9755-46f3-8120-62185021f166 fwd="50.141.68.137" dyno= connect= service= status=503 bytes=
2015-06-15T20:50:18.169656+00:00 heroku[api]: Starting process with command `bash` by c.kazbour#gmail.com
2015-06-15T20:50:21.182682+00:00 heroku[run.7063]: Awaiting client
2015-06-15T20:50:21.207522+00:00 heroku[run.7063]: Starting process with command `bash`
2015-06-15T20:50:21.498626+00:00 heroku[run.7063]: State changed from starting to up
2015-06-15T20:56:22.967959+00:00 heroku[run.7063]: Process exited with status 130
2015-06-15T20:56:22.982990+00:00 heroku[run.7063]: State changed from up to complete
2015-06-15T20:56:34.860491+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simplifly.herokuapp.com request_id=03ab7279-9f54-47f3-bd78-66a1f8878f11 fwd="50.141.68.137" dyno= connect= service= status=503 bytes=
2015-06-15T22:06:06.911203+00:00 heroku[web.1]: State changed from crashed to starting
2015-06-15T22:06:09.190364+00:00 heroku[web.1]: Starting process with command `node app.js`
2015-06-15T22:06:11.192311+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-06-15T22:06:11.192332+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-06-15T22:06:12.342276+00:00 app[web.1]: I'm listening
2015-06-15T22:07:09.670256+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2015-06-15T22:07:09.670341+00:00 heroku[web.1]: Stopping process with SIGKILL
2015-06-15T22:07:10.700825+00:00 heroku[web.1]: State changed from starting to crashed
2015-06-15T22:07:10.687467+00:00 heroku[web.1]: Process exited with status 137
2015-06-15T23:35:04.950903+00:00 heroku[web.1]: State changed from crashed to starting
2015-06-15T23:35:10.538060+00:00 heroku[web.1]: Starting process with command `node app.js`
2015-06-15T23:35:13.112171+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-06-15T23:35:13.120415+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-06-15T23:35:16.100005+00:00 app[web.1]: I'm listening
2015-06-15T23:36:10.835815+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2015-06-15T23:36:10.835815+00:00 heroku[web.1]: Stopping process with SIGKILL
2015-06-15T23:36:11.797436+00:00 heroku[web.1]: Process exited with status 137
2015-06-15T23:36:11.815434+00:00 heroku[web.1]: State changed from starting to crashed
2015-06-16T00:28:50.659338+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simplifly.herokuapp.com request_id=4412f0e2-1e68-4ec0-9a62-47c3f5151cbb fwd="50.141.68.137" dyno= connect= service= status=503 bytes=
2015-06-16T00:28:55.687612+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simplifly.herokuapp.com request_id=b3487f82-36f7-4138-9247-30a8a45effd9 fwd="50.141.68.137" dyno= connect= service= status=503 bytes=
2015-06-16T00:28:58.049747+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simplifly.herokuapp.com request_id=69e2ddf4-9c28-42f5-8aec-47cf51bb4109 fwd="50.141.68.137" dyno= connect= service= status=503 bytes=
Am I reading the log file wrong and the error is somewhere else? Thank you so much for any pointers in the right direction! I have been reading tutorials and googled this but can't figure it out.

Adding express-session to package.json solved my problem.
"express-session": "1.14.2"

Related

docker app on heroku down, but won't start after sending request

I have a spring boot rest api backend packed in a docker container and deployed to heroku under the free plan. It works and after a half hour it goes sleeping. But later, when I open the app and want to send some request, it doesn't start. I see from the logs, that the app was crashed.
Why is that? Why won't the app start? Why even was the app crashed, if it was shutting down gracefully?
Here is the log:
2022-02-27T19:58:05.770090+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2022-02-27T19:58:22.938286+00:00 heroku[web.1]: Idling
2022-02-27T19:58:23.030649+00:00 heroku[web.1]: State changed from up to down
2022-02-27T19:58:23.707002+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2022-02-27T19:58:24.136754+00:00 app[web.1]: 2022-02-27 19:58:24.136 INFO 3 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2022-02-27T19:58:24.158799+00:00 app[web.1]: 2022-02-27 19:58:24.154 INFO 3 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2022-02-27T19:58:24.192171+00:00 app[web.1]: 2022-02-27 19:58:24.191 INFO 3 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
2022-02-27T19:58:24.493677+00:00 heroku[web.1]: Process exited with status 143
2022-02-28T10:01:59.256200+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=**** request_id=3e55141d-753c-4f91-b60b-2c78342f913a fwd="****" dyno= connect= service= status=503 bytes= protocol=https
2022-02-28T10:01:59.869943+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=**** request_id=c64f6bb8-d9af-41ca-ac11-47cdc542eb32 fwd="****" dyno= connect= service= status=503 bytes= protocol=https
2022-02-28T10:02:29.304593+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=**** request_id=9455eceb-fe52-41c4-9016-12496f2dce93 fwd="****" dyno= connect= service= status=503 bytes= protocol=https

Error when opening heroku app

I have deployed my rails app to heroku, and am now trying to open it with "heroku open", however i get the error that "An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.". These are the logs:
2017-12-26T18:40:16.269452+00:00 app[web.1]: => Booting Puma
2017-12-26T18:40:16.261939+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
2017-12-26T18:40:16.261951+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
2017-12-26T18:40:16.269455+00:00 app[web.1]: => Rails 5.1.4 application starting in production
2017-12-26T18:40:16.261978+00:00 app[web.1]: from bin/rails:9:in `require'
2017-12-26T18:40:16.269456+00:00 app[web.1]: Exiting
2017-12-26T18:40:16.269455+00:00 app[web.1]: => Run `rails server -h` for more startup options
2017-12-26T18:40:16.372189+00:00 heroku[web.1]: State changed from starting to crashed
2017-12-26T18:40:16.359435+00:00 heroku[web.1]: Process exited with status 1
2017-12-26T18:40:16.911232+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pacific-stream-77985.herokuapp.com request_id=60caaad5-f16e-4443-8b8f-e278d41d966d fwd="2.104.49.204" dyno= connect= service= status=503 bytes= protocol=https
2017-12-26T18:40:57.610077+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pacific-stream-77985.herokuapp.com request_id=9b3b9601-d003-49fd-8661-fd4494f84632 fwd="2.104.49.204" dyno= connect= service= status=503 bytes= protocol=https
2017-12-26T18:45:46.508705+00:00 heroku[run.1739]: Awaiting client
2017-12-26T18:45:46.560426+00:00 heroku[run.1739]: Starting process with command `rails db:migrate`
2017-12-26T18:45:46.570612+00:00 heroku[run.1739]: State changed from starting to up
2017-12-26T18:45:42.507797+00:00 app[api]: Starting process with command `rails db:migrate` by user <mymail>#gmail.com
2017-12-26T18:45:53.393255+00:00 heroku[run.1739]: Process exited with status 0
2017-12-26T18:45:53.406858+00:00 heroku[run.1739]: State changed from up to complete
2017-12-26T18:46:09.405442+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pacific-stream-77985.herokuapp.com request_id=e38838f5-294c-45eb-a936-81f89e8fed2d fwd="2.104.49.204" dyno= connect= service= status=503 bytes= protocol=https

Failed in deploying to Heroku

When deploying my Ruby on Rails app to heroku, I get an application error page, here
When typing heroku logs in my terminal line, I get the following information which I do not know how to process? Can anyone tell me what I need to do to solve the issue?
2016-07-11T11:12:32.333185+00:00 heroku[api]: Release v2 created by nicholas.wenzel#internsgopro.com
2016-07-11T11:12:32.333065+00:00 heroku[api]: Enable Logplex by nicholas.wenzel#internsgopro.com
2016-07-11T11:13:09.721816+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby app
2016-07-11T11:13:09.721807+00:00 heroku[slug-compiler]: Slug compilation started
2016-07-11T11:17:24.819913+00:00 heroku[api]: Set LANG, RACK_ENV, RAILS_ENV, RAILS_SERVE_STATIC_FILES, SECRET_KEY_BASE config vars by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:24.820006+00:00 heroku[api]: Release v3 created by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:25.503120+00:00 heroku[api]: Attach DATABASE (#ref:postgresql-rectangular-14432) by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:25.503211+00:00 heroku[api]: Release v4 created by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:25.942507+00:00 heroku[api]: Scale to web=1 by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:25.943837+00:00 heroku[api]: Release v5 created by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:25.943474+00:00 heroku[api]: Deploy d12e1f4 by nicholas.wenzel#internsgopro.com
2016-07-11T11:17:26.383271+00:00 heroku[slug-compiler]: Slug compilation started
2016-07-11T11:17:26.383275+00:00 heroku[slug-compiler]: Slug compilation finished
2016-07-11T11:17:28.217297+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 40742 -e production`
2016-07-11T11:17:29.955175+00:00 app[web.1]: bash: bin/rails: No such file or directory
2016-07-11T11:17:30.862720+00:00 heroku[web.1]: Process exited with status 127
2016-07-11T11:17:30.877538+00:00 heroku[web.1]: State changed from starting to crashed
2016-07-11T11:17:30.878343+00:00 heroku[web.1]: State changed from crashed to starting
2016-07-11T11:17:33.707325+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 13244 -e production`
2016-07-11T11:17:35.968520+00:00 app[web.1]: bash: bin/rails: No such file or directory
2016-07-11T11:17:37.094194+00:00 heroku[web.1]: State changed from starting to crashed
2016-07-11T11:17:37.083048+00:00 heroku[web.1]: Process exited with status 127
2016-07-11T11:17:38.324735+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=secret-fjord-97193.herokuapp.com request_id=2fb7b183-2953-4290-a56e-cc4ab8000f5b fwd="31.179.119.186" dyno= connect= service= status=503 bytes=
2016-07-11T11:17:39.262796+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=secret-fjord-97193.herokuapp.com request_id=7a1d15d7-9ce4-44b2-ab29-3853c0223b06 fwd="31.179.119.186" dyno= connect= service= status=503 bytes=
2016-07-11T11:18:47.008968+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by nicholas.wenzel#internsgopro.com
2016-07-11T11:18:50.699273+00:00 heroku[run.8742]: Awaiting client
2016-07-11T11:18:50.745068+00:00 heroku[run.8742]: Starting process with command `bundle exec rake db:migrate`
2016-07-11T11:18:50.800462+00:00 heroku[run.8742]: State changed from starting to up
2016-07-11T11:18:57.245641+00:00 heroku[run.8742]: Process exited with status 0
2016-07-11T11:18:57.263781+00:00 heroku[run.8742]: State changed from up to complete
2016-07-11T11:19:05.165252+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=secret-fjord-97193.herokuapp.com request_id=1847e12b-66b1-44a9-8f5a-b50505aeb464 fwd="31.179.119.186" dyno= connect= service= status=503 bytes=
2016-07-11T11:19:41.487888+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=secret-fjord-97193.herokuapp.com request_id=631d71c7-d998-48d6-acd8-5ea507ba4554 fwd="31.179.119.186" dyno= connect= service= status=503 bytes=
2016-07-11T11:20:03.603738+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=secret-fjord-97193.herokuapp.com request_id=ceef2839-b13b-4794-9e17-1a87b8b344f8 fwd="31.179.119.186" dyno= connect= service= status=503 bytes=
Run rake rails:update:bin to create a bin folder that was added in rails4, then make a commit and push to Heroku. Hope this helps.

H10 error, desc="App crashed" showing "Application Error" on the heroku page

I am trying to deploy my application from my desktop to heroku. But shoiwng application error on the page. Here is the display of heroku logs :
2015-05-17T14:23:16.824327+00:00 app[web.1]: Exiting
2015-05-17T14:23:16.796436+00:00 app[web.1]: from bin/rails:8:in `<main>'
2015-05-17T14:23:16.796435+00:00 app[web.1]: from bin/rails:8:in `require'
2015-05-17T14:23:17.773437+00:00 heroku[web.1]: State changed from starting to crashed
2015-05-17T14:23:17.760552+00:00 heroku[web.1]: Process exited with status 1
2015-05-17T14:23:57.689913+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pacific-beach-3105.herokuapp.com request_id=85de2fe6-d894-4f53-a995-1285be93c58d fwd="203.110.246.22" dyno= connect= service= status=503 bytes=
2015-05-17T14:23:59.999420+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=pacific-beach-3105.herokuapp.com request_id=7384ee1f-1efc-4801-9a4a-a34a0d17f8fb fwd="203.110.246.22" dyno= connect= service= status=503 bytes=
2015-05-17T14:24:01.833524+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=pacific-beach-3105.herokuapp.com request_id=934a68f4-84e5-4259-9455-52d8f8602c06 fwd="203.110.246.22" dyno= connect= service= status=503 bytes=
2015-05-17T14:24:31.083965+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by sameerrrana#gmail.com
2015-05-17T14:24:34.043331+00:00 heroku[run.6109]: Starting process with command `bundle exec rake db:migrate`
2015-05-17T14:24:34.759590+00:00 heroku[run.6109]: State changed from starting to up
2015-05-17T14:24:38.220213+00:00 app[run.6109]: ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2015-05-17T14:24:38.954062+00:00 heroku[run.6109]: State changed from up to complete
2015-05-17T14:24:38.944714+00:00 heroku[run.6109]: Process exited with status 0
2015-05-17T14:25:11.918187+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pacific-beach-3105.herokuapp.com request_id=d5969403-490c-4da1-aa01-905bfd39b9a1 fwd="203.110.246.22" dyno= connect= service= status=503 bytes=
2015-05-17T14:34:31.213525+00:00 heroku[api]: Starting process with command `rails console` by sameerrrana#gmail.com
2015-05-17T14:34:35.566430+00:00 heroku[run.6202]: Awaiting client
2015-05-17T14:34:35.900197+00:00 heroku[run.6202]: State changed from starting to up
2015-05-17T14:35:05.572297+00:00 heroku[run.6202]: Error R13 (Attach error) -> Failed to attach to process
2015-05-17T14:35:07.029088+00:00 heroku[run.6202]: Process exited with status 128
2015-05-17T14:35:07.045904+00:00 heroku[run.6202]: State changed from up to complete
2015-05-17T14:40:45.980758+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by sameerrrana#gmail.com
2015-05-17T14:40:50.488405+00:00 heroku[run.7608]: Starting process with command `bundle exec rake db:migrate`
2015-05-17T14:40:51.155554+00:00 heroku[run.7608]: State changed from starting to up
2015-05-17T14:40:56.358175+00:00 app[run.7608]: ActiveRecord::SchemaMigration Load (2.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
2015-05-17T14:40:57.410610+00:00 heroku[run.7608]: State changed from up to complete
2015-05-17T14:40:57.396701+00:00 heroku[run.7608]: Process exited with status 0
2015-05-17T14:41:11.499509+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=pacific-beach-3105.herokuapp.com request_id=ddc2f1be-2fb0-43d6-a24d-00e9a6631be0 fwd="203.110.246.22" dyno= connect= service= status=503 bytes=
I have been to every question regarding Application error and Error H10 but can't solve it . Please help
Add this line in the Gemfile.
gem 'pg', group: :production
then
bundle install
and commit the changes to the github. And then run the command
git push heroku master

Nginx and Heroku. Serving Static Files

Goal:
Going to https://secret-sands-1568.herokuapp.com/myFile.html will display the content of client/myFile.html sent by Nginx.
From what I understand, Heroku dynos are normally used for Nodejs/Ruby/other apps but they can be converted to anything by modifying the buildrack.
I copied the content of https://github.com/theoephraim/nginx-buildpack.
I added a folder named tmp with a file app-initialized.
I added a folder named client with a file myFile.html.
In config/nginx.conf.erb, I changed location / by
location / {
root client;
index index.html index.htm;
}
I created a file Procfile with content: web: bin/start-nginx.
I entered heroku config:set BUILDPACK_URL=https://github.com/ryandotsmith/nginx-buildpack.git.
I entered git init heroku create git push heroku master heroku ps:scale web=1.
Yet, when I go https://secret-sands-1568.herokuapp.com/myFile.html, there's nothing. Heroku logs says:
2015-05-19T07:13:32.990254+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:33.995458+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:34.998228+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:36.000823+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:37.005955+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:38.008548+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:39.011184+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:40.013788+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:41.016516+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:42.019372+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:43.023551+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:44.029985+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:45.035183+00:00 app[web.1]: buildpack=nginx at=app-initialization
2015-05-19T07:13:45.910618+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2015-05-19T07:13:45.910618+00:00 heroku[web.1]: Stopping process with SIGKILL
2015-05-19T07:13:46.732519+00:00 heroku[web.1]: State changed from starting to crashed
2015-05-19T07:13:46.718745+00:00 heroku[web.1]: Process exited with status 137
2015-05-19T07:17:12.890713+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=obscure-caverns-1927.herokuapp.com request_id=6d15e849-ce45-41bc-9bad-60d9eb0454ef fwd="24.200.222.98" dyno= connect= service= status=503 bytes=
2015-05-19T07:17:13.039723+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=obscure-caverns-1927.herokuapp.com request_id=7aeecc36-05b5-4799-bf0a-6ba97b2a6190 fwd="24.200.222.98" dyno= connect= service= status=503 bytes=
2015-05-19T07:17:18.350029+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/myFile" host=obscure-caverns-1927.herokuapp.com request_id=cb77356f-ddf3-4795-b56d-fa9cde5d134a fwd="24.200.222.98" dyno= connect= service= status=503 bytes=
2015-05-19T07:17:18.471762+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=obscure-caverns-1927.herokuapp.com request_id=64a89596-b287-4b89-a3ce-ed750e4fb1c1 fwd="24.200.222.98" dyno= connect= service= status=503 bytes=
2015-05-19T07:17:22.250495+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=obscure-caverns-1927.herokuapp.com request_id=4ccda4e8-1532-49dc-8658-e67312ef333d fwd="24.200.222.98" dyno= connect= service= status=503 bytes=
2015-05-19T07:17:22.125124+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/myFile.html" host=obscure-caverns-1927.herokuapp.com request_id=33cdee81-2dda-44cb-acf7-2dc5b4156ef2 fwd="24.200.222.98" dyno= connect= service= status=503 bytes=
What am I doing wrong? My goal is to have a stand-alone Nginx server that deserve static file.
Edit: For serving static files specifically, you don't need to go through all the effort of this. There's a buildpack heroku-community/static which is hugely more simple than the nginx ones, and the instructions cater to static sites. And I just got my Angular site working using it.
I know this probably won't help the original asker, but it will probably help others who find this.
Note: This is only a partial answer. I'm still looking for more debugs. But I managed to get mine to go from a Timeout to serving all 404 pages by doing the following.
Also note, I'm not using one from github. I'm using https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-nginx, added via heroku buildpacks:add heroku-community/nginx
Procfile:
web: bin/start-nginx-solo
This should serve static files instead of trying to route to another listener.
So far, I keep getting nginx errors as follows: open() "/dist/index.html" failed (2: No such file or directory) (These are from app[web.1]). The build was successful, but it just can't locate any of the files. Still working on that, but at least it doesn't crash due to boot timeouts anymore.

Resources