

capistrano でaws にrailsアプリをデプロイしようとしています。

bash_profileにもsecret_key_baseを設定してもエラーになります。  
ログには以下エラーlog/unicorn.log

[code]

    E, [2016-10-19T21:13:14.943197 #23416] ERROR -- : app error: Missing `secret_token` and `secret_key_base` for 'production' environment, set these values in `config/secrets.yml` (RuntimeError)
    E, [2016-10-19T21:13:14.943289 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/railties-4.2.7/lib/rails/application.rb:534:in `validate_secret_key_config!'
    E, [2016-10-19T21:13:14.943316 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/railties-4.2.7/lib/rails/application.rb:246:in `env_config'
    E, [2016-10-19T21:13:14.943341 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/railties-4.2.7/lib/rails/engine.rb:514:in `call'
    E, [2016-10-19T21:13:14.943360 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/railties-4.2.7/lib/rails/application.rb:165:in `call'
    E, [2016-10-19T21:13:14.943395 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/tempfile_reaper.rb:15:in `call'
    E, [2016-10-19T21:13:14.943414 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/commonlogger.rb:33:in `call'
    E, [2016-10-19T21:13:14.943431 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/chunked.rb:54:in `call'
    E, [2016-10-19T21:13:14.943456 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
    E, [2016-10-19T21:13:14.943475 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:580:in `process_client'
    E, [2016-10-19T21:13:14.943495 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:674:in `worker_loop'
    E, [2016-10-19T21:13:14.943514 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:529:in `spawn_missing_workers'
    E, [2016-10-19T21:13:14.943531 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:140:in `start'
    E, [2016-10-19T21:13:14.943548 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/gems/unicorn-4.9.0/bin/unicorn:126:in `<top (required)>'
    E, [2016-10-19T21:13:14.943575 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `load'
    E, [2016-10-19T21:13:14.943593 #23416] ERROR -- : /var/www/zen/shared/bundle/ruby/2.2.0/bin/unicorn:23:in `<main>'
    
[/code]

解決方法を教えていただきたいです。

confit/secret.ymlは以下の設定をしています。

[code]

    production:
      secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
    
[/code]


CC BY-SA 3.0
2016-10-19T12:21:20.450
29704
2016-11-24T02:26:54.457
2016-10-23T10:06:45.670
754
10851
question
ruby-on-rails capistrano
capistrano でaws にrailsアプリをデプロイすると白い画面が出てエラーになる