Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superhero Name App: https://super-me.herokuapp.com/ #12

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

darylshy
Copy link

@darylshy darylshy commented Nov 3, 2014

I've been working for hours after finally getting my app to push up to heroku master to also get it to run. I keep getting this error in the web browser:

"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."

And this when I check the heroku logs....

2014-11-03T02:59:17.588682+00:00 heroku[api]: Deploy 8b76b1d by [email protected]
2014-11-03T02:59:17.588756+00:00 heroku[api]: Release v12 created by [email protected]
2014-11-03T02:59:17.775550+00:00 heroku[web.1]: State changed from crashed to starting
2014-11-03T02:59:20.455096+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 13001`
2014-11-03T02:59:22.236706+00:00 app[web.1]:    from /app/config.ru:1:in `block in <main>'
2014-11-03T02:59:22.236708+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2014-11-03T02:59:22.236709+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2014-11-03T02:59:22.236711+00:00 app[web.1]:    from /app/config.ru:in `new'
2014-11-03T02:59:22.236712+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2014-11-03T02:59:22.236680+00:00 app[web.1]: /app/supername.rb:2:in `require': cannot load such file -- Sinatra (LoadError)
2014-11-03T02:59:22.236700+00:00 app[web.1]:    from /app/supername.rb:2:in `<top (required)>'
2014-11-03T02:59:22.236702+00:00 app[web.1]:    from /app/config.ru:1:in `require'
2014-11-03T02:59:22.236714+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2014-11-03T02:59:22.236716+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2014-11-03T02:59:22.236717+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2014-11-03T02:59:22.236719+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2014-11-03T02:59:22.236720+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2014-11-03T02:59:22.236722+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2014-11-03T02:59:22.236723+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2014-11-03T02:59:22.236724+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2014-11-03T02:59:22.236726+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2014-11-03T02:59:22.236729+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2014-11-03T02:59:22.236731+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2014-11-03T02:59:23.125378+00:00 heroku[web.1]: State changed from starting to crashed
2014-11-03T02:59:23.121313+00:00 heroku[web.1]: Process exited with status 1
2014-11-03T02:59:23.714935+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-brushlands-2575.herokuapp.com request_id=f9e93191-8c20-400c-84ea-b81dcac4a2b1 fwd="54.82.54.5" dyno= connect= service= status=503 bytes=
2014-11-03T02:59:27.056347+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-brushlands-2575.herokuapp.com request_id=768383ad-0b5a-4f05-9e16-007c7974febf fwd="47.17.204.89" dyno= connect= service= status=503 bytes=
2014-11-03T03:08:03+00:00 heroku[slug-compiler]: Slug compilation started
2014-11-03T03:08:12+00:00 heroku[slug-compiler]: Slug compilation finished
2014-11-03T03:08:12.654463+00:00 heroku[api]: Deploy d963be9 by [email protected]
2014-11-03T03:08:12.654612+00:00 heroku[api]: Release v13 created by [email protected]
2014-11-03T03:08:12.777771+00:00 heroku[web.1]: State changed from crashed to starting
2014-11-03T03:08:16.028322+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 29184`
2014-11-03T03:08:17.608115+00:00 app[web.1]: /app/supername.rb:2:in `require': cannot load such file -- Sinatra (LoadError)
2014-11-03T03:08:17.608142+00:00 app[web.1]:    from /app/config.ru:1:in `require'
2014-11-03T03:08:17.608137+00:00 app[web.1]:    from /app/supername.rb:2:in `<top (required)>'
2014-11-03T03:08:17.608145+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2014-11-03T03:08:17.608143+00:00 app[web.1]:    from /app/config.ru:1:in `block in <main>'
2014-11-03T03:08:17.608159+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2014-11-03T03:08:17.608147+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2014-11-03T03:08:17.608164+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2014-11-03T03:08:17.608154+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2014-11-03T03:08:17.608157+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2014-11-03T03:08:17.608156+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2014-11-03T03:08:17.608160+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2014-11-03T03:08:17.608149+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2014-11-03T03:08:17.608166+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2014-11-03T03:08:17.608148+00:00 app[web.1]:    from /app/config.ru:in `new'
2014-11-03T03:08:17.608167+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2014-11-03T03:08:17.608153+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2014-11-03T03:08:17.608169+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2014-11-03T03:08:17.608151+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2014-11-03T03:08:18.377614+00:00 heroku[web.1]: State changed from starting to crashed
2014-11-03T03:08:18.360924+00:00 heroku[web.1]: Process exited with status 1
2014-11-03T03:08:18.976171+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-brushlands-2575.herokuapp.com request_id=0698b8c5-4c59-4c36-af72-88fc8f08604b fwd="47.17.204.89" dyno= connect= service= status=503 bytes=
2014-11-03T03:08:19.985272+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-brushlands-2575.herokuapp.com request_id=7c567041-bf09-41d8-a9d7-cd54761ec518 fwd="54.82.54.5" dyno= connect= service= status=503 bytes=
2014-11-03T03:10:26.796835+00:00 heroku[web.1]: State changed from crashed to starting
2014-11-03T03:10:29.763653+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 7804`
2014-11-03T03:10:31.644314+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2014-11-03T03:10:31.644315+00:00 app[web.1]:    from /app/v
endor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2014-11-03T03:10:31.644309+00:00 app[web.1]:    from /app/supername.rb:2:in `<top (required)>'
2014-11-03T03:10:31.644311+00:00 app[web.1]:    from /app/config.ru:1:in `require'
2014-11-03T03:10:31.644320+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2014-11-03T03:10:31.644322+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2014-11-03T03:10:31.644325+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2014-11-03T03:10:31.644326+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2014-11-03T03:10:31.644328+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2014-11-03T03:10:31.644341+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:250:in `start'
2014-11-03T03:10:31.644342+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:141:in `start'
2014-11-03T03:10:31.644343+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/bin/rackup:4:in `<top (required)>'
2014-11-03T03:10:31.644345+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2014-11-03T03:10:31.644346+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2014-11-03T03:10:31.644312+00:00 app[web.1]:    from /app/config.ru:1:in `block in <main>'
2014-11-03T03:10:31.644287+00:00 app[web.1]: /app/supername.rb:2:in `require': cannot load such file -- Sinatra (LoadError)
2014-11-03T03:10:31.644317+00:00 app[web.1]:    from /app/config.ru:in `new'
2014-11-03T03:10:31.644318+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2014-11-03T03:10:31.644319+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2014-11-03T03:10:32.754611+00:00 heroku[web.1]: Process exited with status 1
2014-11-03T03:10:32.769758+00:00 heroku[web.1]: State changed from starting to crashed
2014-11-03T03:12:18.132724+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-brushlands-2575.herokuapp.com request_id=668f53a7-24bb-42a0-b1f4-c849aa9e5bce fwd="47.17.204.89" dyno= connect= service= status=503 bytes=
2014-11-03T03:15:14+00:00 heroku[slug-compiler]: Slug compilation started
2014-11-03T03:15:19+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby app
2014-11-03T03:17:25+00:00 heroku[slug-compiler]: Slug compilation started
2014-11-03T03:17:29+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Ruby app
2014-11-03T03:18:47+00:00 heroku[slug-compiler]: Slug compilation started
2014-11-03T03:19:06+00:00 heroku[slug-compiler]: Slug compilation finished
2014-11-03T03:19:06.638129+00:00 heroku[api]: Deploy 98ff2c5 by [email protected]
2014-11-03T03:19:06.638293+00:00 heroku[api]: Release v14 created by [email protected]
2014-11-03T03:19:07.518930+00:00 heroku[web.1]: State changed from crashed to starting
2014-11-03T03:19:09.646663+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 15635`
2014-11-03T03:19:10.340724+00:00 app[web.1]: /usr/bin/env: ruby_executable_hooks: No such file or directory
2014-11-03T03:19:11.157659+00:00 heroku[web.1]: Process exited with status 127
2014-11-03T03:19:11.173075+00:00 heroku[web.1]: State changed from starting to crashed
2014-11-03T03:19:14.355142+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-brushlands-2575.herokuapp.com request_id=f31690a7-354f-46bb-90ca-5cdcdb9bad32 fwd="54.82.54.5" dyno= connect= service= status=503 bytes=
2014-11-03T03:19:21.705319+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-brushlands-2575.herokuapp.com request_id=b840294c-6899-4d22-a40f-de4e5ebf66d8 fwd="47.17.204.89" dyno= connect= service= status=503 bytes=
2014-11-03T03:46:34.316504+00:00 heroku[web.1]: State changed from crashed to starting
2014-11-03T03:46:36.035146+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 52317`
2014-11-03T03:46:36.667233+00:00 app[web.1]: /usr/bin/env: ruby_executable_hooks: No such file or directory
2014-11-03T03:46:37.460345+00:00 heroku[web.1]: State changed from starting to crashed
2014-11-03T03:46:37.450828+00:00 heroku[web.1]: Process exited with status 127
2014-11-03T03:46:41.302803+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shrouded-brushlands-2575.herokuapp.com request_id=b988e289-7a14-4512-a9ea-19d61377111f fwd="47.17.204.89" dyno= connect= service= status=503 bytes=

…divse me of why I'm unable to run this app on Heroku
@afeld
Copy link
Member

afeld commented Nov 3, 2014

Two things:

  • It doesn't appear that you committed the files to this repository correctly: https://github.com/cuny-nytech/single-purpose/pull/12/files. Can you fix so we can actually see them?
  • Heroku only installs the gems specified in the Gemfile, so config.ru not knowing what Sinatra is means it is most likely not in there.

@darylshy
Copy link
Author

darylshy commented Nov 3, 2014

Just submitted new pull request, files should be visible this time. Not sure what happened originally. Also,
gem 'sinatra' "1.4.5' is the second line of my Gemfile., so it should be recognized.
Sent from my iPhone

On Nov 2, 2014, at 10:53 PM, Aidan Feldman [email protected] wrote:

Two things:

It doesn't appear that you committed the files to this repository correctly: https://github.com/cuny-nytech/single-purpose/pull/12/files. Can you fix so we can actually see them?
Heroku only installs the gems specified in the Gemfile, so config.ru not knowing what Sinatra is means it is most likely not in there.

Reply to this email directly or view it on GitHub.

@darylshy
Copy link
Author

darylshy commented Nov 3, 2014

Also, I just noticed that somehow one of my rough drafts, "SuperName.erb" slipped in there. It's a duplicate of the final draft name.erb. It can be disregarded.
On Nov 2, 2014, at 10:53 PM, Aidan Feldman wrote:

Two things:

It doesn't appear that you committed the files to this repository correctly: https://github.com/cuny-nytech/single-purpose/pull/12/files. Can you fix so we can actually see them?
Heroku only installs the gems specified in the Gemfile, so config.ru not knowing what Sinatra is means it is most likely not in there.

Reply to this email directly or view it on GitHub.

@@ -0,0 +1,17 @@
require 'rubygems'
require 'Sinatra'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not positive that it matters, but try making this lower-case.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying now

Sent from my iPhone

On Nov 2, 2014, at 11:22 PM, Aidan Feldman [email protected] wrote:

In Daryl_Shy_SPA/supername.rb:

@@ -0,0 +1,17 @@
+require 'rubygems'
+require 'Sinatra'
I'm not positive that it matters, but try making this lower-case.


Reply to this email directly or view it on GitHub.

@afeld
Copy link
Member

afeld commented Nov 3, 2014

Try moving all of the files to the top level of the project directory – this is where Heroku will look for them.

I just noticed that somehow one of my rough drafts, "SuperName.erb" slipped in there

Why not delete the file from this repository then?

@darylshy
Copy link
Author

darylshy commented Nov 3, 2014

OHHH.. That may be the key. In production all the tuts said put them in a view and public file. Trying this now. Thanks for the help btw

Sent from my iPhone

On Nov 2, 2014, at 11:23 PM, Aidan Feldman [email protected] wrote:

Try moving all of the files to the top level of the project directory – this is where Heroku will look for them.

I just noticed that somehow one of my rough drafts, "SuperName.erb" slipped in there

Why not delete the file from this repository then?


Reply to this email directly or view it on GitHub.

@afeld
Copy link
Member

afeld commented Nov 3, 2014

all the tuts said put them in a view and public file.

What do you mean by "them"? Templates and CSS/JS/assets, respectively, but not the Gemfile/config.ru/server code.

@afeld
Copy link
Member

afeld commented Nov 3, 2014

...and no problem!

@darylshy
Copy link
Author

darylshy commented Nov 3, 2014

'Them' as in views in a view folder and images and stylessheets in a public folder

Sent from my iPhone

On Nov 2, 2014, at 11:30 PM, Aidan Feldman [email protected] wrote:

all the tuts said put them in a view and public file.

What do you mean by "them"? Templates and CSS/JS/assets, respectively, but not the Gemfile/config.ru/server code.


Reply to this email directly or view it on GitHub.

@afeld
Copy link
Member

afeld commented Nov 3, 2014

Sorry, let me rephrase: move everything out of the Daryl_Shy_SPA/ directory.

@darylshy
Copy link
Author

darylshy commented Nov 3, 2014

oh, ok. will redo. on a separate note, I'm suddenly getting this bundler error:
-----> Ruby app detected
-----> Compiling Ruby/Rack
-----> Using Ruby version: ruby-2.1.1
-----> Installing dependencies using 1.6.3
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
/usr/bin/env: ruby_executable_hooks: No such file or directory
Bundler Output: /usr/bin/env: ruby_executable_hooks: No such file or directory
!
! Failed to install gems via Bundler.
!

! Push rejected, failed to compile Ruby app

not sure why. i tried taking the bundler gem out of the gem file and taking the requirement out of the main rb file. had no affect at all. this error did not pop up until after i added the require 'bundler/setup' requirement to the main .rb file and the bundler/setup gem to the gem file. taking it out; adding it back in, has no affect either way, so idk what's happening when it was compiling before.
On Nov 2, 2014, at 11:38 PM, Aidan Feldman wrote:

Sorry, let me rephrase: move everything out of the Daryl_Shy_SPA/ directory.


Reply to this email directly or view it on GitHub.

@afeld
Copy link
Member

afeld commented Nov 3, 2014

Are you able to run the app locally (with rackup, or similar)? Hard to say what the problem is without seeing the updated code.

@darylshy
Copy link
Author

darylshy commented Nov 3, 2014

I've not tried running it with rackup, I just run it with a local server like slim or shotgun.

Sent from my iPhone

On Nov 2, 2014, at 11:53 PM, Aidan Feldman [email protected] wrote:

Are you able to run the app locally (with rackup, or similar)? Hard to say what the problem is without seeing the updated code.


Reply to this email directly or view it on GitHub.

@afeld
Copy link
Member

afeld commented Nov 3, 2014

Yeah, make sure it works with bundle install && bundle exec rackup, because that is what Heroku will do by default. Slim and Shotgun are usually fine too, but let's eliminate variables.

@darylshy
Copy link
Author

darylshy commented Nov 3, 2014

Ok, will do

Sent from my iPhone

On Nov 2, 2014, at 11:57 PM, Aidan Feldman [email protected] wrote:

Yeah, make sure it works with bundle install && bundle exec rackup, because that is what Heroku will do by default. Slim and Shotgun are usually fine too, but let's eliminate variables.


Reply to this email directly or view it on GitHub.

require 'bundler/setup'


get '/index' do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want this route to show up at https://shrouded-brushlands-2575.herokuapp.com/ instead of https://shrouded-brushlands-2575.herokuapp.com/index, just change it to '/'.

@darylshy darylshy changed the title I'm adding my SPA to the repo so that you can have a look and maybe adv... Superhero Name App Nov 12, 2014
@darylshy darylshy changed the title Superhero Name App Superhero Name App: https://super-me.herokuapp.com/ Nov 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants