How to run ruby programs on Windows 7? How to run ruby programs on Windows 7? ruby ruby

How to run ruby programs on Windows 7?


http://rubyinstaller.org/ - "The easy way to install Ruby on Windows".

Will give you the language and execution environment - everything you should need to get started.


Ruby isn't compiled, but rather interpreted. You need to install Ruby using the above link given by @ilollar.

Then, if you have the source code of a program in the file some_ruby.rb, you will execute this in cmd:

ruby some_options.rb

This is the general form of a ruby command:

ruby [ruby options] [program name] [program options]


Here is a free online book that will answer most of the question you have about Ruby if you are just starting out: http://ruby.learncodethehardway.org/book/

It's called "Learn Ruby the Hard Way", but don't let the name throw you off - the book is actually pretty easy to follow and doesn't assume you know anything about programming.

It will get you started writing Ruby and running programs for the first time.

Like ilollar said, the Ruby Installer is the best way to put Ruby on your Windows computer.

I'm currently running Ruby on Windows 7 writing Rails applications. You can do a lot on Windows with Ruby, however, you can't do everything. There are bundles of files that you can download that will help you write your Ruby programs - they are called Gems. Some gems will not run on Windows - The Ruby Racer and some versions of EventMachine are two that immediately come to mind.

This can be frustrating, but if it ever happens you can install a version of Linux in a virtual machine on your Windows computer so that you can use these gems without having to get a new machine.

You can also install Linux to run alongside Windows without having to reformat or mess with the partitions on your hard drive. There is a program called 'Wubi' that will install Ubuntu (a version of Linux) to run inside your Windows machine. It will actually let you pick Windows or Linux when you start your machine.

But all this is stuff to think about later on. You can certainly develop Ruby on Windows for now.