Anu
Joined: 01 Jan 2010 Posts: 80
|
Posted: Mon Feb 01, 2010 9:57 am Post subject: Rails application with sqlite database |
|
|
Hi,
To connect with the sqlite database instead of mysql,there are some few changes to be done.
Remaining the all procedure is same when compared with mysql database.
We should done some changes on database.yml file and in controller.rb file.
In database.yml file we should change the adapter.
adapter: sqlite3
encoding: utf8
database: <database_name>.db
username: root
password: root
And in controller.rb,we have to include the below,
>>require 'rubygems'
>> require 'sqlite3'
and create a database with <database_name>.db in sqlite database.
Thanks & Regards,
Anasuya.N |
|