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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:33:53+00:00 2026-05-20T15:33:53+00:00

For example, in config/environments/production.rb in a Rails 3 app, there is config.serve_static_assets = false

  • 0

For example, in config/environments/production.rb in a Rails 3 app, there is

config.serve_static_assets = false

and many variables. How can they be all printed out as a whole (perhaps in an object, instead of specifying each one-by-one) (print out in a view, such as FooController#index), just for looking into what types of values are available and to see what they are set to?

Also, how to print out the values in the .yml files (as a hash and/or in some config object?) and in config/initializers, such as for

MyAppFoo::Application.config.session_store :active_record_store

I found that we can print out the content of

ActiveRecord::Base.configurations

but not

ActionController::Base.configurations

are there ways to print out all info of the MVC components?

  • 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-20T15:33:54+00:00Added an answer on May 20, 2026 at 3:33 pm

    Most of the Rails config stuff can be accessed through:

    Rails.application.config.<your_variable>
    

    With regards to printing out the values of .yml files in config, you’d have to do that yourself becuase Rails will only load up the values for the current environment from database.yml, and any custom yml config files will be just that – custom. Here’s one way you could load them all up…

    all_configs = []
    Dir[Rails.root.join("config/*.yml")].each {|f| all_configs << YAML.load_file(f) }
    

    With regards to settings set in initializers, if it’s a Rails config option (such as the session store which you’ve given as an example), then it will be available through Rails.application.config. If not, (for example configuration for a gem) then you will have to manually find those settings from the gem classes.

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

Sidebar

Related Questions

Is it posible to re-cache app.config? for example after changing some fields in app.config
When working in .NET, I can use the web.config or app.config to set up
We have multiple environments (development, test, Production, etc). Using Oracle 10g. All values are
Can anyone give a specific example of when the following setting in Config.groovy is
I'm using my config/environments/<env>.rb files to set custom configuration variables (see https://stackoverflow.com/a/5053882/483520 ). For
My Spring config looks like this: <jee:remote-slsb id=ejb1 jndi-name=org.example.Ejb1 business-interface=org.example.Ejb1 environment-ref=ejb1Properties> </jee:remote-slsb> <util:properties id=ejb1Properties
For example: A.php (the config file): <?php $a = array('name'=>'wine[$index][name]', 'value'=>'wine[$index][value]' ) ?> B.php:
I use a config object to store configuration information. So something like this example:
I am trying to register a custom HttpHandler in the web.config file. MSDN's example
Can you deploy a Rails3 app using Bundler's Gemfile WITHOUT running bundle install ...

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.