How to use 2 different db (mysql and postgres) -ror

From Sandoz

Jump to: navigation, search

->/models/albums_import.rb

  1. from freebase db -> postgres

class AlbumsImport < ActiveRecord::Base

 establish_connection :postgres_development  
     

end


->database.yml

  1. postgres_development:
  1. adapter: postgresql
  1. database: pull-freebase-data
  1. host: localhost
  1. username: postgres
  1. password: mysql
  1. pool: 5
  1. timeout: 5000
  1. reconnect: true
Personal tools