Follow these steps to install versions not supported by the one-click installer.
- Download the version you want at the official Ruby website. Make sure to select a Windows binary archive, not a source code archive.
- Extract the contents of the archive to the directory of your choice (e.g. c:\ruby).
- Add the Ruby binaries to your system path. In Windows Vista, open the Start Menu, right-click Computer, then select Properties > Advanced System Settings > Environment Variables. Append
;c:\ruby\bin
to thePATH
system variable. (If you extracted Ruby to a different location, modify your entry accordingly.) - Click OK to save your settings.
- Get http://www.zlib.net/zlib123-dll.zip.
Extract zlib1.dll to your Ruby installation’s bin directory, then rename it to zlib.dll. - Get version 1.2.0 of RubyGems (1.3.0 doesn’t work on Windows as of this writing). Make sure to select one of the source archives, not the update gem.
- Extract the contents of the archive to a temporary directory, then run
setup.rb
. - Go back to the Environment Variables tab in step 3. Create a new system variable called
RUBYOPT
and set its value to–rubygems
. - Open a command prompt window and run
gem install rake
.
You should now have a working installation of your desired version of Ruby.
Thanks! Just what I was looking for.
Thanks, this really helps!!
Thanks for this. An addendum though:
If you’re installing Ruby 1.9.1 on Windows, you might get a “Ruby Unable to Locate Component” dialog. What this means is that the readline.dll library to be installed.
The solution is to download the binary .zip from
http://gnuwin32.sourceforge.net/packages/readline.htm,
extract the bin/readline5.dll file to the ruby bin folder (it should be C:\ruby\bin). You then rename it to readline.dll, and that should get rid of that annoying error message.