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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:16:34+00:00 2026-05-12T10:16:34+00:00

I am writing an app that has different parts running on multiple servers. As

  • 0

I am writing an app that has different parts running on multiple servers. As a result, I have a ruby file filled with global values, which contain the IP addresses of the machines on which each part is running.

The app has a Rails front end that connects to a remote database (on one of the other servers). Is it possible to make use of the ruby global variable for the sql server IP inside the database.yml file?

If it’s not possible to use the ruby global in the yml file, I’m open to other suggestions for better ways to achieve what I’m trying to do (xml or something similar) – the Ruby file was only for simplicity.

Thanks in Advance

  • 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-12T10:16:34+00:00Added an answer on May 12, 2026 at 10:16 am

    I believe that you can use ERB inside of your database.yml file.

    # database.yml
    <% load('path/to/globals.rb') %>
    development:
      host: <%= GLOBAL_CONFIG["development_sql"] %>
      ...
    

    However I have yet to try this.

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

Sidebar

Related Questions

I have an iPhone app that I am writing and it has 2 targets
I am writing an app that has a ListView of text. In each row
I'm writing an app that monitors the user's location. I have a CLLocationManager object
I am working on an app that has several different views, two of the
I am writing a php/mysql app that uses a few different tables. Table 1
We're in the process of writing an app that has 4 tabs: Map, People,
What naming convention is recommended when writing an MVC app that has both front-end
I am currently writing an app that I have a SQLite DB that contains
I am in the process of writing a web-app that uses multiple web APIs.
Writing a PHP app and have several classes that only have static methods (no

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.