REST, Ruby On Rails, CouchDB and ME – Part 1 – Ruby   Leave a comment

Part 0 – Introduction to Ruby, RadRails and CouchDB

Part 1 – This Post

Part 2 – Aptana IDE For Ruby

Part 3 –CouchDB Up and Running on Windows

Part 4 – CouchDB, Curl and RUBY

Part 5 – Getting The Data Ready for CouchDB

Part 6 – Getting The Data Into And Out Of CouchDB

Part 7 – JQUERY,JPlayer and HTML5

We installed Ruby for Windows from RubyInstaller (for Windows) MIX11_BB_SeeYouAt_1. We installed Ruby 1.8.7-p180 and its associated documentation.  The documentation is in p7zip format – so you might need 7zip imagefor windows to open up the documentation.  Download a 7Zip installer  here.  I allowed the windows installer for windows to place the Ruby binaries and helper files into it default location (c:\Ruby187).

Since Aptana (which will will use for Rails development) is touchy about changing Ruby versions this is a better option than placing Ruby in a generic location like C:\Ruby.  To use Ruby scripts or interactively you will need to have ruby on your path.  In my case the path value needs to include c:\Ruby187\bin.  Note that this is the executable path for Ruby and irb (interactive Ruby) and not the load path (aka $Load_Path).  I put the path into my local user environment set.  As you develop your Ruby chops you can write short Ruby programs in the text editor of your choice, save them with an extension of “rb”  and then run them from a command shell as:   image For quick learning experiences there is also a Ruby line interpreter (irb).   Run it as:clip_image001

Ruby.exe (and irb) can be run with an assortment of  command line options.  Find out about these by running:  Ruby –h and irb –h.  There are several ways to install support libraries to Ruby.  The most common method is to use Ruby GEMS.  GEMS support is pre-loaded with Ruby 1.8.7 and can be accessed through the command shell and (as usual) minimal help canclip_image001[9] be found using the –h command line option.  So there you have it for command line Ruby. A Ruby compiler and Why’s (poignant) Guide To Ruby is all you need to get started.   In my next installment to this series we will move on to a Ruby IDE – specifically the Aptana RadRails (and Ruby) IDE.


Posted 2011/03/11 by Cloud2013 in Ruby

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: