Post Tagged with: "ruby on rails"

How to install SQLite3 for Ruby on Rails on Windows

How to install SQLite3 for Ruby on Rails on Windows

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

  1. 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.
  2. After downloading the file extract the sqlite3.exe file to Ruby bin directory (Ruby » Bin).
  3. 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.
  4. After downloading the sqlitedll zip file you need to extract the sqlite3.dll and sqlite3.def files to Windows System32 folder.
  5. After inserting the dll and def files on System32 folder open your command line and type gem install sqlite3-ruby
  6. Now SQLite3 should be properly installed on your Windows RoR server.
    Start your RoR server (Command line » ruby script/server) or use NetBeans.
  7. 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

Ruby on Rails server with SQLite3 installed

And that’s it. You have installed SQLite on your Windows RoR server. Feel free to comment.

6 de December de 2009 4 comments Read More