Flotsam & Jetsam

blatherings and ephemera that I learn and find about Technology, Chocolate, Food and miscellaneous tidbits.

Flotsam & Jetsam header image 2

Installing Ruby

December 2nd, 2009 · No Comments

Ruby and Ruby on Rails is all the rage these days. As a dev environment, it’s one of the most simple I’ve ever worked with.

  1. Ruby –
    Install latest Ruby one-click installer for Windows from http://rubyforge.org/projects/rubyinstaller/
    Include Ruby Gems.
    Up to you on installing the editor.
    Once you’ve installed Ruby, type this at the command line
    ruby -vyou should see the latest version returned. Mine is ruby 1.8.6 .

    If you see “Command not found”, make sure that you reload the command (close & open new) window after the install.

  2. Update gems. Type this at the command line
    gem update –system
  3. If you encounter a HTTP Error 403 trying to install Gems, here’s a workaround:download the latest gems from http://rubyforge.org/frs/?group_id=126 (I used 1.3.1)
    unzip / untar the file
    cd rubygems-1.3.1
    ruby setup.rb

    Then do at the command line to bring it up to date:
    gem update –system

  4. Now, install Rails. Type at the command line:
    gem install rails  –include-dependencies
  5. Install a database. For learning and dev work, sqllite is a good choice. You can upgrade to MySQL later if you wish.
    Get the latest version from here: http://www.sqlite.org/download.html.
    You’ll need the command line application zip and the DLL zip.
    Download, extract and install to your Ruby bin directory.To test that everything is working well type at the command line:
    sqlite3

    You should see a response that says something like: “SQLite version 3.6.16? and give you a prompt. Type ctrl-c or ctrl-break to exit.

  6. Install the sqlite3 gem. Type at the command line:
    gem install sqlite3-ruby

Voila!  Done.  Now you can start coding in Ruby using your favorite text editor.

gem install rails --include-dependencies

Tags: Uncategorized