1

I am trying to deploy my Rails app to Heroku. All I have done so far is create the rails app, install the bundle and commit it to bitbucket. The next step was to deploy to Heroku and print hello world to confirm that its working. I am getting this error:

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

I tried searching for a similar error but I could not find anything specific to my problem. Here are the heroku logs:

heroku[api]: Enable Logplex by [email protected]
heroku[api]: Release v2 created by [email protected]
heroku[api]: Set LANG, RAILS_ENV, RACK_ENV, SECRET_KEY_BASE, RAILS_SERVE_STATIC_FILES config vars by [email protected]
heroku[api]: Release v3 created by [email protected]
heroku[api]: Attach DATABASE resource by [email protected]
heroku[api]: Release v4 created by [email protected]
heroku[api]: Scale to web=1 by [email protected]
heroku[api]: Deploy 221c876 by [email protected]
heroku[api]: Release v5 created by [email protected]
heroku[slug-compiler]: Slug compilation started
heroku[slug-compiler]: Slug compilation finished
heroku[web.1]: Starting process with command `bin/rails server -p 16863 -e production`
app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent/compute.rb:3:in `require': cannot load such file -- net/ssh (LoadError)
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent/compute.rb:3:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent.rb:1:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent.rb:1:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog.rb:40:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog.rb:40:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:3:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage.rb:9:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:3:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage.rb:9:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave.rb:78:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave.rb:78:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
app[web.1]:    from /app/config/application.rb:7:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
app[web.1]:    from bin/rails:9:in `require'
app[web.1]:    from bin/rails:9:in `<main>'
heroku[web.1]: Process exited with status 1
heroku[web.1]: State changed from starting to crashed
heroku[web.1]: State changed from crashed to starting
heroku[web.1]: Starting process with command `bin/rails server -p 14724 -e production`
app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent/compute.rb:3:in `require': cannot load such file -- net/ssh (LoadError)
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent/compute.rb:3:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent.rb:1:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog/joyent.rb:1:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog.rb:40:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/fog-1.23.0/lib/fog.rb:40:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:3:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage/fog.rb:3:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage.rb:9:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave/storage.rb:9:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave.rb:78:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/carrierwave-0.10.0/lib/carrierwave.rb:78:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
app[web.1]:    from /app/config/application.rb:7:in `<top (required)>'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
app[web.1]:    from bin/rails:9:in `require'
app[web.1]:    from bin/rails:9:in `<main>'
heroku[web.1]: Process exited with status 1
heroku[web.1]: State changed from starting to crashed
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=polar-mountain-3183.herokuapp.com request_id=4dbb54f0-d4f6-478a-8ef0-899d8030e160 fwd="174.113.76.61" dyno= connect= service= status=503 bytes=
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=polar-mountain-3183.herokuapp.com request_id=426832e0-0555-4d98-91d1-1ffdede05f6f fwd="174.113.76.61" dyno= connect= service= status=503 bytes=

I deleted the date and time of the logs so its easier to read and the lines are not as wide. I also removed my email/account for obvious reasons.

2 Answers 2

1

By looking at logs it seems there is something with fog gem which causes problem in starting rails server.

As you said, you just wanted to test "Hello world" I would suggest for the time being please remove fog gem from Gemfile and re-deploy on heroku.

If everything works fine then later you can always debug fog issue.

Sign up to request clarification or add additional context in comments.

1 Comment

Yup that was exactly the problem. I figured it out late last night but was too tired to remove this post.
1

Here's the error:

'require': cannot load such file -- net/ssh (LoadError)

Looks like you've tried to include some sort of ssh capability into your app?

Specifically, it looks like it's coming from the fog gem.

According to the following question, you should be able to add either the fog or net-ssh gems to your app to get it working:

#Gemfile
gem 'fog', '~> 1.36.0'
gem 'net-ssh'

Add those locally, then push to Heroku.

Stab in the dark; I'll happily delete the answer if it doesn't work.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.