Getting started with Ruby is really easy, there is a lot of resources out there to help you learn the language. Once you have Ruby mastered, or at least a weak understanding of Ruby you should try out Rails. Here is how to get started so you can see what all the fuss is about.
First go to
http://rubyinstaller.rubyforge.org and download the Ruby one click installer. Next, next next through the installer dialog. Once everything is installed, Ruby should be located at C:\Ruby (unless you changed the path).
To ensure everything installed correctly open a command prompt and type: ruby -v
If the command prompt tells you the version of Ruby you just installed you should be good.
Once you have Ruby installed, there are a number of good free sources to learn Ruby from:
Programming Ruby : The Pragmatic Programmer's Guide EbookWhy's Poignant Guide to Ruby EBook (possibly the funniest computer book ever written)
Try Ruby! (in your browser) You don't even need to install Ruby to try it.
If you don't have the patience to read a book on Ruby, I recommend downloading WATIR at
http://wtr.rubyforge.org/ and hacking the examples to test a webpage. For example, type the following in notepad and save the file as stevensearch.rb
require 'watir' # the watir controller
# set a variable
test_site = 'http://www.stevenrockarts.com/blog/default.aspx'
# open the IE browser
ie = Watir::IE.new
ie.goto(test_site)
ie.text_field(:id, "searchString").set("ruby")
ie.button(:id, "_ctl168_Button1").click
if ie.contains_text("Ruby")
puts "Test Passed. Found the test string: 'Ruby'. Actual Results match Expected Results."
else
puts "Test Failed! Could not find: 'Ruby'"
end
Now open a command prompt and go to the location where you saved the file. Type the following into the command prompt: ruby stevensearch.rb
The Watir Ruby script will open a new instance of Internet Explorer, come to this page, type ruby into the search textbox, click the search button and then ensure that the word "Ruby" shows up on the page.
If you thought typing into notepad and runnning Ruby through the command prompt was too much work, go to
http://sapphiresteel.com and download the latest version of Ruby in Steel for Visual Studio 2005. This will allow you to create Ruby projects and Ruby files right inside Visual Studio.
Now we are on a roll. Lets try out Rails. The fastest and easiest way to get started with Ruby on Rails is to go to
http://instantrails.rubyforge.org and download InstantRails. InstantRails contains everything you need to run Rails, prepackaged and configured in a zip file. All you need to do is to extract it to a directory and Rails is ready to go. To try it out go follow along to the screencast by Matt Griffith located
here.