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 6391261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:39:01+00:00 2026-05-25T03:39:01+00:00

I have setup my application configuration for my rails 3.1 application as described here

  • 0

I have setup my application configuration for my rails 3.1 application as described here by Ryan Bates.

Problem is I want to use the config in my environment file for username/password for ActionMailer, but Ryan suggests loading the config from an initializer, and they seem to get included after environment.rb. Where is the best place to load the configuration file so it can be accessed by the whole rails application?

Thanks

  • 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-05-25T03:39:01+00:00Added an answer on May 25, 2026 at 3:39 am

    In that case, this code should go in as a pre-initializer. As of Rails 3, all pre-initialization code needs to go near the top of application.rb, just before the line require 'rails/all'

    application.rb:

    require File.expand_path('../boot', __FILE__)  
    
    # load app_config.yml  
    require 'yaml'  
    APP_CONFIG = YAML.load(File.read(File.expand_path('../app_config.yml', __FILE__)))  
    
    require 'rails/all'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Setup : I have a Struts web application where I use displaytag elements to
I have a Inno Setup project that I want to check if the application
I have a big XML file the setup my application. There are a lot
I have a setup project with InstallShield 2010. I'm deploying a configuration file during
I am using DWR for one of my application. I have setup the environment
I want to use this gem in my api application https://github.com/seangeo/auth-hmac/ I have a
I have Winforms application that must create write to certain configuration file during usage.
The Setup I have a Ruby on Rails application that I manage from a
Hi I have a setup project in my application.Setup includes 5 files (a.txt,b.doc etc.)
I have a dependency injection container setup in my application and I'm thinking that

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.