Sunday, April 26, 2009

Installing Ruby on Rails on Windows with SQLite

posted by Lars Hundebøl # 09:12 AM

The following is a step-by-step guideline to how I installed Ruby On Rails for Windows with SQLite as the database.

  1. Download the latest version of Ruby One-Click installer for Windows here, and run the installer. This will install Ruby (naturely) and RubyGems, the package manager for Ruby.

    At the time of writting this tutorial, I downloaded and installed Ruby-186-26 (stable).

  2. Update RubyGems by executing the following line in a command prompt:

    gem update --system
    


  3. Now install Rails using RubyGems, by executing the following line in a command prompt:

    gem install rails --include-dependencies
    

    This will install Rails and all relevant dependencies. Please note that this may take some time to install.

  4. Download the lastest SQLite from here, and unzip it into the Ruby bin directory (by default c:\ruby\bin). You'll only need the pre-compiled DLL; at the time of writing, the version I downloaded and unzipped was sqlitedll-3_6_13.zip.

  5. Finally install SQLite3-Ruby using RubyGems, by executing the following line in a command prompt:

    gem install sqlite3-ruby -v 1.2.3
    


    By the time of writing version 1.2.3 was the latest version actually working with Windows.

I've used the installation guideline on Windows Vista and Windows 7 (Build 7000) without any problems. The latest version of Ruby on Rails is preconfigured to use SQLite, and therefore no additional configuration is required after creating a new rails project.

Leave a comment

Your name

Your e-mail (will not be displayed)†

†Your e-mail will never be displayed and only used on the site to display your gravatar (if you got one), and as a means to potentially get back to you, if I have any feedback or questions regarding your comment.

all posts