Rails app crashing on Heroku! Railstutorial.org app

Hi, could really use some help!

I’ve finished Chapter 11 but my Heroku app won’t load.

My carrier_wave.rb reads:

if Rails.env.production?
CarrierWave.configure do |config|
config.fog_credentials = {
# Configuration for Amazon S3
:provider => ‘AWS’,
:aws_access_key_id => ENV[‘S3_ACCESS_KEY’],
:aws_secret_access_key => ENV[‘S3_SECRET_KEY’],

}
config.fog_directory = ENV[‘S3_BUCKET’]
config.fog_attributes = {‘Cache-Control’=>‘max-age=315576000’}
config.storage = :fog

end
end

The environment variables are set in heroku.

My heroku logs show:

Error R10 (Boot timeout) → Web process failed to bind to $PORT within
60 seconds of launch
heroku[web.1]: Stopping process with SIGKILL
heroku[web.1]: Process exited with status 137
heroku[web.1]: State changed from starting to crashed
heroku[router]: at=error code=H10 desc=“App crashed” method=GET
path=“/” host=cryptic-escarpment-6115.herokuapp.com
request_id=cdbf878e-b272-4e85-8917-5be7a46c6448 fwd=“68.81.200.36” dyno=
connect= service= status=503 bytes=
heroku[router]: at=error code=H10 desc=“App crashed” method=GET
path=“/favicon.ico” host=cryptic-escarpment-6115.herokuapp.com
request_id=b7e408dc-d831-47f1-99ee-5f74b26a2a72 fwd=“68.81.200.36” dyno=
connect= service= status=503 bytes=

When I run heroku ps (after a restart) it shows:

=== web (Free): bundle exec puma -C config/puma.rb
web.1: crashed 2015/09/02 15:24:17 (~ 10s ago)

I had hurl.it try to GET my page and I got a 503 error

Does anyone have any idea what could be wrong? I’ve made changes to
carrier_wave.rb as suggested in various StackOverflow questions, added
an application.yml file (I’ve since removed), and have declared the
variables in secrets.yml like this (also removed):

S3_SECRET_KEY: <%= ENV[“S3_SECRET_KEY”] %>

None of it has helped. In AWS I added a user, gave him full permissions
to the bucket, and I even tried setting the permissions to allow
everyone R&W.

Any advice is much appreciated. I can provide any additional code
necessary.

On Wed, Sep 2, 2015 at 12:31 PM, Farmer C. [email protected]
wrote:

I’ve finished Chapter 11 but my Heroku app won’t load.

When I run heroku ps (after a restart) it shows:

=== web (Free): bundle exec puma -C config/puma.rb
web.1: crashed 2015/09/02 15:24:17 (~ 10s ago)

What version of Ruby? Rails? Puma? What’s in your puma.rb?

Do you get the same error running in production mode locally?


Hassan S. ------------------------ [email protected]

twitter: @hassan
Consulting Availability : Silicon Valley or remote

Rails 4.2.2 ruby 2.2.3, I will get back to you about puma (at work rn).
No local errors. The failure has to do with either fog, imagemagick or
Amazon Web Services because puma runs locally, too.