RailsApps / rails-composer

Rails Composer. The Rails generator on steroids for starter apps.
http://www.railscomposer.com/
3.38k stars 486 forks source link

Heroku setup fails for "Custom Application" when using Foreman .env file #258

Open dugjason opened 8 years ago

dugjason commented 8 years ago
deployment
  deployment  recipe stage three
  deployment  precompiling assets for Heroku
         run    RAILS_ENV=production rake assets:precompile from "."
rake aborted!
TypeError: no implicit conversion of nil into String
/Users/jason/apps/my_app/config/initializers/devise.rb:15:in `+'
/Users/jason/apps/my_app/config/initializers/devise.rb:15:in `block in <top (required)>'
/Users/jason/apps/my_app/config/initializers/devise.rb:3:in `<top (required)>'
/Users/jason/apps/my_app/config/environment.rb:5:in `<top (required)>'
/Users/jason/.rbenv/versions/2.3.1/bin/ruby_executable_hooks:15:in `eval'
/Users/jason/.rbenv/versions/2.3.1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)
  deployment  creating app.json file for Heroku Button
      create    app.json
      append    app.json

The line it's upset about (/Users/jason/apps/my_app/config/initializers/devise.rb:15) is:

  config.mailer_sender = 'no-reply@' + Rails.application.secrets.domain_name

Looking in secrets.yml after setup, we do have a default domain_name value; domain_name: example.com. I assume we're running this Heroku section before this placeholder domain_name value has been populated