Could someone please clarify whether it's possible for rails to use
two different databases at the same time within one application; for
example, I've a web application written in C# using MSSQL as the
database, and on the other hand I'm looking to write a ruby/rails
application using postgres as the database backend. I don't want to
save data to the MSSQL database but simply query tables and work with
the results. Any database saving will occur only in postgres. So far
I haven't been able to determine whether this is possible.
Could someone please clarify whether it's possible for rails to use
two different databases at the same time within one application; for
example, I've a web application written in C# using MSSQL as the
database, and on the other hand I'm looking to write a ruby/rails
application using postgres as the database backend. I don't want to
save data to the MSSQL database but simply query tables and work with
the results. Any database saving will occur only in postgres. So far
I haven't been able to determine whether this is possible.
Yes, it's possible, and fairly easy. Look at
ActiveRecord::Base.establish_connect (and google for establish_connection
and rails for some good examples of its use).