Ruby Simplified Part 1: Installing Ruby on Windows

Install the current version of Ruby (2.0.0-p247) using the Ruby Installer. During installing choose the options below, and finish the installation process.

image

Now if you go to the C:\Ruby folder, you’ll see,

image

Open up a command prompt, and type ruby –v,

image

We’ve successfully installed the current version! To get help with more Ruby commands use ruby –h.

Now let’s try out “Hello World” in Ruby. Type ‘irb’ at the command prompt to get the Interactive Ruby Shell – it’s a command line for Ruby. Then use puts to output a string.

image

To run a ruby file, create a file ‘hello.rb’,

image

Now execute the file with ruby hello.rb,

image

Advertisements

About soumya chattopadhyay
I live and work in Seattle, WA. I work with Microsoft technologies, and I'm especially interested in C#.

One Response to Ruby Simplified Part 1: Installing Ruby on Windows

  1. Pingback: Ruby Simplified Series | I.Net

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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: