I've searched long and hard and can't resolve this issue. I've even deleted the old heroku site and made another.
I created an AWS account, made a user, gave the user full permissions for my bucket.
I've set the secret keys on Heroku (via terminal and the site) and I've tried setting them in both production.rb and development.rb as so S3_ACCESS_KEY = 'xxxx'
My carrier_wave.rb looks like this
` 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']
end
end`
I've tried adding different things like :region
and :host
as suggested by various SO questions but it doesn't make a difference.
My Heroku logs show
`2015-08-30T15:36:29.574898+00:00 app[web.1]: [3] * Listening on tcp://0.0.0.0:3000
2015-08-30T15:36:29.575137+00:00 app[web.1]: [3] Use Ctrl-C to stop
2015-08-30T15:36:29.842552+00:00 app[web.1]: [3] - Worker 0 (pid: 6) booted, phase: 0
2015-08-30T15:36:29.951221+00:00 app[web.1]: [3] - Worker 1 (pid: 15) booted, phase: 0
2015-08-30T15:36:46.027166+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=intense-sierra-1318.herokuapp.com request_id=cf0eb0fb-a9a8-4e36-a17b-457af96b15f2 fwd="68.81.200.36" dyno= connect= service= status=503 bytes=
2015-08-30T15:37:10.347183+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/favicon.ico" host=intense-sierra- 1318.herokuapp.com request_id=6ae64831-17a7-497e-8416-9b2870b62c97 fwd="166.216.165.52" dyno= connect= service= status=503 bytes=
2015-08-30T15:37:12.635345+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2015-08-30T15:37:12.635345+00:00 heroku[web.1]: Stopping process with SIGKILL
2015-08-30T15:37:14.311191+00:00 heroku[web.1]: Process exited with status 137
2015-08-30T15:37:14.325709+00:00 heroku[web.1]: State changed from starting to crashed
2015-08-30T15:37:21.671523+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=intense-sierra-1318.herokuapp.com request_id=623c2c5b-906d-4b6c-b9ca-de4503242b3b fwd="68.81.200.36" dyno= connect= service= status=503 bytes=
2015-08-30T15:37:41.716401+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=intense-sierra-1318.herokuapp.com request_id=e9f0958c-5008-45f5-bd2c-f6bbf93e8f4a fwd="166.216.165.52" dyno= connect= service= status=503 bytes=
2015-08-30T15:37:41.862125+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=intense-sierra-1318.herokuapp.com request_id=861b02c1-2c0b-4fce-9dcc-6619fc632442 fwd="166.216.165.52" dyno= connect= service= status=503 bytes=
2015-08-30T15:37:43.445862+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=intense-sierra-1318.herokuapp.com request_id=59dd08ab-e784-416a-82e2-6d06f3ed3e1d fwd="166.216.165.52" dyno= connect= service= status=503 bytes=
2015-08-30T15:37:43.612208+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=intense-sierra-1318.herokuapp.com request_id=0b0ac1fb-8288-49a3-b4e8-85a7ec151e15 fwd="166.216.165.52" dyno= connect= service= status=503 bytes=
2015-08-30T15:38:00.376281+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=intense-sierra-1318.herokuapp.com request_id=307d4327-bf26-40dd-b471-5eff80579f38 fwd="68.81.200.36" dyno= connect= service= status=503 bytes= `
When I try to run rails server -e production
I get
`Exiting
/Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/fog-core-1.32.0/lib/fog/core/service.rb:244:in `validate_options': Missing required arguments: aws_access_key_id, aws_secret_access_key (ArgumentError)
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/fog-core-1.32.0/lib/fog/core/service.rb:268:in `handle_settings'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/fog-core-1.32.0/lib/fog/core/service.rb:98:in `new'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/fog-core-1.32.0/lib/fog/core/services_mixin.rb:16:in `new'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/fog-core-1.32.0/lib/fog/storage.rb:22:in `new'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/carrierwave-0.10.0/lib/carrierwave/uploader/configuration.rb:83:in `eager_load_fog'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/carrierwave-0.10.0/lib/carrierwave/uploader/configuration.rb:96:in `fog_credentials='
from /Users//trumptalk/TrumpTalk/config/initializers/carrierwave.rb:3:in `block in <top (required)>'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/carrierwave-0.10.0/lib/carrierwave/uploader/configuration.rb:118:in `configure'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/carrierwave-0.10.0/lib/carrierwave.rb:14:in `configure'
from /Users//trumptalk/TrumpTalk/config/initializers/carrierwave.rb:2:in `<top (required)>'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:268:in `load'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:268:in `block in load'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.2/lib/active_support/dependencies.rb:268:in `load'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.2/lib/active_support/notifications.rb:166:in `instrument'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/engine.rb:651:in `load_config_initializer'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/engine.rb:615:in `each'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/initializable.rb:30:in `run'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in each_strongly_connected_component_from'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongly_connected_component_from'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/initializable.rb:44:in `each'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:413:in `call'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connected_component_from'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /Users//.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/application.rb:352:in `initialize!'
from /Users//trumptalk/TrumpTalk/config/environment.rb:5:in `<top (required)>'
from /Users//trumptalk/TrumpTalk/config.ru:3:in `require'
from /Users//trumptalk/TrumpTalk/config.ru:3:in `block in <main>'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users//trumptalk/TrumpTalk/config.ru:in `new'
from /Users//trumptalk/TrumpTalk/config.ru:in `<main>'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/server.rb:61:in `app'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/server.rb:80:in `start'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands.rb:17:in `<top (required)>'
from /Users//trumptalk/TrumpTalk/bin/rails:8:in `require'
from /Users//trumptalk/TrumpTalk/bin/rails:8:in `<top (required)>'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /Users//.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users//.rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users//.rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users//trumptalk/TrumpTalk/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
BTW just in case anyone is wondering I named the site TrumpTalk (and made it Trump themed) because I find him pretty amusing, everyone is always talking about Trump.
Aucun commentaire:
Enregistrer un commentaire