Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7904089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:54:32+00:00 2026-06-03T09:54:32+00:00

I am trying to set the fb app id (used by omniauth) so that

  • 0

I am trying to set the fb app id (used by omniauth) so that its global to devise initialiser and to the controllers.

MORE INFO

I need it in devise initialiser (config/initializer/devise.rb) so that I can set
config.omniauth :facebook, fb_app_id, fb_app_secret

Attempted Solution

I tried adding this info into a yml file ( http://railscasts.com/episodes/85-yaml-configuration-file ), however, looks like the yml hash is set for the controllers, but I can not use it for the devise initialiser.

/home/ubuntu/myapp/config/initializers/devise.rb:215:in `block in <top (required)>': uninitialized constant APP_CONFIG (NameError)

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:54:33+00:00Added an answer on June 3, 2026 at 9:54 am

    For those who are interested, I ended up writing up the variables in config/environments/production.rb & config/environments/development.rb

    You can set global variables by adding:

    config.fb_app_id = 23839282 
    config.fb_app_secret = aj32j32j4jk
    

    (set the appropriate one in production.rb or development.rb)

    These can then be used in initialisers, and also in my actual application’s views, controllers, etc.

    Rails.configuration.fb_app_id
    Rails.configuration.fb_app_secret
    

    Read the second answer in:
    How to define custom configuration variables in rails

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to set the UIRequiredDeviceCapabilities properties in my Info.plist file. My app requires
I have a Pylons app that I'm trying to set up using Apache and
Im trying to set up my app to work with authlogic.. the thing is,
Trying to set up Cancan within an app of mine and having trouble with
I am trying to set a cookie in my Google App Engine page: self.response.headers.add_header('Set-Cookie','CookieName=1234;
I am trying to set the scaleMode on my AIR app. which is set
I am trying to set up a Sinatra based Ruby app to connect to
I'm trying to set up a date of birth helper in my Rails app
I'm trying to set up a batch file to automatically deploy a php app
I'm trying to set this up where the user gives username and password in-app,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.