Recently I started learning Ruby and Ruby on Rails. One of my challenges was installing an SQL server on my computer. Although I had XAMPP installed I wanted to keep the structure learned during my training class which was based on SQLite3.
This post will teach you how to install SQLite for Ruby on Rails on Windows by following 7 easy steps.
For what I understood the Rails team decided that development was easier when using SQLite instead of MySQL thus making SQLite3 the new default for RoR versions after 2.0.2.
Installing SQLite 3 on Windows
- Go to SQLite official download page and look for Precompiled Binaries For Windows and click on the .zip file.
In my case the most recent version is sqlite-3_6_20.zip so let’s download the file. - After downloading the file extract the sqlite3.exe file to Ruby bin directory (Ruby » Bin).
- Now you need to download 2 extra files a .dll file and a .def file (damn you windows). On SQLite official download page look for sqlitedll-(version) being version the current version of SQLite. In my case this is sqlitedll-3_6_20.zip. You can find this file under Precompiled Binaries For Windows section on the download page.
- After downloading the sqlitedll zip file you need to extract the sqlite3.dll and sqlite3.def files to Windows System32 folder.
- After inserting the dll and def files on System32 folder open your command line and type
gem install sqlite3-ruby - Now SQLite3 should be properly installed on your Windows RoR server.
Start your RoR server (Command line » ruby script/server) or use NetBeans. - Open a browser window and type http://localhost:3000. You should get a welcome page saying «Welcome aboard». Click on the link called “«About your application’s environment» too see some information about your server. You should have a line saying Database adapter sqlite3

And that’s it. You have installed SQLite on your Windows RoR server. Feel free to comment.
aladino
16 de April de 2010 at 8:57
First time on RoR, I have the same prob occurs while installing my RoR localhost, now my server is well working. Your instructions really worked out.
This very informative… keep up the good work man!
Waqas
21 de May de 2010 at 7:14
Hey,
Your instructions really, saved a lot of time. Really good work.
Thanks a lot.