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

  • Home
  • SEARCH
  • 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 5976249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:12:05+00:00 2026-05-22T21:12:05+00:00

How to setup my Rails app so it will be able to use both

  • 0

How to setup my Rails app so it will be able to use both Salesforce and PostgreSQL as a backend on Heroku. My current code is:

#environment.rb 
...
config.gem "asf-soap-adapter", :lib => 'asf-soap-adapter'
config.database_configuration_file = File.join(RAILS_ROOT, 'config', 'salesforce.yml')

salesforce.yml contains config for both PostgreSQL and SF. This doesn’t work because it replaces current Heroku database.yml, so I am not able to connect to DB.

Any ideas how to solve this?

  • 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-22T21:12:05+00:00Added an answer on May 22, 2026 at 9:12 pm

    OK, so it seams that I have figured it out:
    All you need to do is to create a separate config file for backends, e.g. “salesforce.yml“, which looks like this:

    development:
      # usual stuff that you put at your database.yml
    
    test:
      # usual stuff that you put at your database.yml
    
    production:
      # you need to get following from Heroku (http://devcenter.heroku.com/articles/database#database_urls)
      host: #host of Herkou db
      adapter: postgresql
      encoding: unicode
      database: # Heroku db name
      username: # Heroku db username
      password: # Heroku db password
    
    salesforce-default-realm:
      adapter: activesalesforce
      url: https://www.salesforce.com
      username: #salesforce username
      password: #{salesforce_password}{salesforce_security_token}
      api_version: 20.0
    

    Then environment.rb:

    ...
    config.gem "asf-soap-adapter", :lib => 'asf-soap-adapter'
    config.database_configuration_file = File.join(RAILS_ROOT, 'config', 'salesforce.yml')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to setup a rails app on heroku that is part of a
I am about to be writing a Ruby on Rails app which will use
I've got my Rails (2.1) app setup to send email via Gmail, however whenever
I've got a RESTful setup for the routes in a Rails app using text
I've been trying to setup my first rails app--I'm okay at stumbling around on
I'm trying to setup a routing system for my rails app that allows for
I'd like to set up a staging server for a Rails app. I use
I have an existing Rails app on GitHub and deployed on Heroku. I'm trying
I am trying to setup central_logger (https://github.com/customink/central_logger) to my heroku app. Can someone please
I have a link in my rails app setup to make an ajax request

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.