I\'ve read up on the documentation on how to do this, but in practice, I am having problems. In my app, I have 2 different databases as described below in my database.yml file.
I tried to replicate and got it to work. It has to do with naming conventions: You're in development mode and AR will look for the development tag, which in your case does not exist for sqlite.
Here is my database.yml:
development:
adapter: mysql2
database: se_development
username: root
pool: 5
timeout: 5000
sqlite_development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
Here is the model:
class Plot < ActiveRecord::Base
establish_connection 'sqlite_' + Rails.env
end
Worked for me. Hope this helps.