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?
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:
Then environment.rb: