title: Rails - Devise/Omniauth - No Method Error Configuration
body: <p>I'm trying to integrate facebook authentication with devise.  </p>
  
  <p>I used this tutorial (<a href="http://sourcey.com/rails-4-omniauth-using-devise-with-twitter-facebook-and-linkedin" rel="nofollow">http://sourcey.com/rails-4-omniauth-using-devise-with-twitter-facebook-and-linkedin</a>) and got it to work locally, but I keep getting an error when I push to heroku.  I have already changed the links in the Facebook dev/apps part to the actual domain.  </p>
  
  <p>I have the following code in <code>production.rb</code>.  For "app_domain" part, I've tried to put in all types of app domain variations (the domain, domain.com, heroku app name, etc.) but I have no idea what should go there.    </p>
  
  <p>I'm a new coder, so would appreciate any help!  </p>
  
  <pre><code># Email for omniauth facebook auth
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.default_url_options = { :host =&gt; config.app_domain }
  config.action_mailer.smtp_settings = {
  address: 'smtp.gmail.com', 
  port: '587',
  enable_starttls_auto: true,
  user_name: 'someuser',
  password: 'somepass',
  authentication =&gt; :plain,
  domain =&gt; 'somedomain.com'
  }
  </code></pre>
  
  <blockquote>
    <p>NoMethodError: undefined method `app_domain' for</p>
    
    <h1></h1>
  
  <pre><code>   /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/railtie/configuration.rb:95:in
  </code></pre>
    
    <p><code>method_missing'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/config/environments/production.rb:100:in
    </code>block in '
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/railtie.rb:210:in
    <code>instance_eval'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/railtie.rb:210:in
    </code>configure'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/config/environments/production.rb:1:in
    <code>&lt;top (required)&gt;'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in</code>require'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in <code>block in require'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in</code>load_dependency'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in <code>require'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/engine.rb:594:in
    </code>block (2 levels) in '
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/engine.rb:593:in
    <code>each'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/engine.rb:593:in
    </code>block in '
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in
    <code>instance_exec'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in
    </code>run'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:55:in
    <code>block in run_initializers'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:44:in
    </code>each'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:44:in
    <code>tsort_each_child'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:54:in
    </code>run_initializers'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:288:in
    <code>initialize!'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/config/environment.rb:5:in
    </code>'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in <code>require'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in</code>block in require'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in <code>load_dependency'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in</code>require'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:264:in
    <code>require_environment!'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:367:in
    </code>block in run_tasks_blocks'
           /tmp/build_9557c4b1-3f72-41e9-bc67-afe937d8b044/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.1.3/lib/sprockets/rails/task.rb:55:in
    `block (2 levels) in define'
           Tasks: TOP => environment
           (See full trace by running task with --trace)  !  !     Precompiling assets failed.</p>
  </blockquote>