0

I am trying to connect multiple databases in my rails app one as a primary and the other as a secondary. This is what I have in my database.yml

# SQLite version 3.x 
# gem install sqlite3 
# 
# Ensure the SQLite 3 gem is defined in your Gemfile 
# gem 'sqlite3' 
# 
# development: 
# adapter: postgresql 
# database: martin_development 
# username: 
# password: 
# pool: 5 
# timeout: 5000 


development: 
adapter: sqlserver 
host: 
port: 1433 
database: 
username: 
password:

I left out some data for obvious reasons but the sqlserver is connected but I lost all my data from the postgresql database and I need it as well because it holds separate data for the blog and author logins et cetera. How would I accomplish this?

Jermaine Subia
  • 776
  • 1
  • 7
  • 31
  • 1
    Possible duplicate of [Connecting to multiple databases in ruby on rails](https://stackoverflow.com/questions/17311199/connecting-to-multiple-databases-in-ruby-on-rails) – Pardeep Dhingra Aug 03 '17 at 04:52
  • You can check this article for more detail: http://www.blrice.net/blog/2016/04/09/one-rails-app-with-many-databases/ – Arif Usman Aug 03 '17 at 06:42

0 Answers0