Thursday, August 21, 2008

Install sqlite3 on Windows for Ruby on Rails

  1. Go to http://www.sqlite.org, and download sqlitedll under "Precompiled Binaries For Windows".
  2. Extract the file and put two files sqlite3.dll and sqlite3.def in the ruby bin's directory, i.e., C:\ruby\bin.
  3. Run "gem install sqlite3-ruby" to install sqlite3-ruby gem. (Try "gem install --version 1.2.3 sqlite3-ruby" if the latest version is not working)
  4. For GUI interface, download "SQLite Manager" plugin for Firefox.
  5. Under your project, config/database.yml, make sure you use sqlite3 adapter. Something like: development:
    adapter: sqlite3
    database: db/development.sqlite3
    timeout: 5000