Thursday, May 28, 2009

Ruby on Windows XP installation

Don't install the one click installer from ruby site. This will not help you if your script has some 'fork' command on it. Windows don't support fork.

Get CYGWIN and select the category development select-> make, select interpreters -> ruby , select Base -> cygwin

If you use default Cygwin installation these packages will not be installed. After installation type in 'which ruby' on the $ prompt this will show the ruby installation directory this is import to know about the installation directory so you can add up the location of the ruby binary on the header of your script.

Now if you want to add ruby libraries download the rubygem package from http://rubyforge.org/frs/?group_id=126
un-tar the package and to the directory. type in ruby setup.rb that will setup the gems to your ruby installation. Now to install individual gems

example. gem install hpricot


this will install the hpricot library to ruby installation.

0 Comments: