title: Rails: Where to define facebook app id so that it is available to the devise initializer and the controllers.
body: <p>I am trying to set the fb app id (used by omniauth) so that its global to devise initialiser and to the controllers.</p>
  
  <p><strong>MORE INFO</strong></p>
  
  <p>I need it in devise initialiser (config/initializer/devise.rb) so that I can set
  config.omniauth :facebook, fb_app_id, fb_app_secret</p>
  
  <p><strong>Attempted Solution</strong></p>
  
  <p>I tried adding this info into a yml file ( <a href="http://railscasts.com/episodes/85-yaml-configuration-file" rel="nofollow">http://railscasts.com/episodes/85-yaml-configuration-file</a> ), however, looks like the yml hash is set for the controllers, but I can not use it for the devise initialiser. </p>
  
  <pre><code>/home/ubuntu/myapp/config/initializers/devise.rb:215:in `block in &lt;top (required)&gt;': uninitialized constant APP_CONFIG (NameError)
  </code></pre>
  
  <p>Any ideas?</p>