Google search bar

January 16, 2009

Install Ruby from binaries on Windows

Suppose you want to install ruby on Microsoft Windows and you don't want to use the One-click installer. Maybe it's because the installer is for ruby 1.8.6 and the newest stable binaries are for 1.8.7. You just have to get the most up-to-date binaries, because obviously 1.8.6 is just way too old.

I looked around for instuctions and found the answer posted by Lolindrath at stackoverflow.com.

  1. Download the windows binaries for Ruby 1.8.7 here: http://www.ruby-lang.org/en/downloads/ extract that to wherever you would like, I use c:\ruby. Then put c:\ruby\bin in your PATH environment variable.
  2. Download the zlib package: http://www.zlib.net/zlib123-dll.zip and extract the zlib1.dll, rename it to zlib.dll and move it into your Windows\System32.
  3. Download the iconv package: http://sourceforge.net/project/showfiles.php?group_id=25167&package_id=51458. Find and extract the iconv.dll into your Windows\System32.
  4. Download the rubygems package and follow the instructions, basically extracting the package and running ruby setup.rb
  5. Verify that everything works properly by trying a gem install rails, once that installs then do: rails test_project
These are the steps just as they were posted. I didn't just download the libraries from the links above. I checked for newer versions, but as of this post, there were none. I have not done step five. But I've installed a few gems and a couple of scripts I've written run fine.

No comments: