Install ruby 1.9 on Windows using zip binary

Update:  This post is outdated. All in one installer for 1.9 is ready now, you should use it if you need 1.9 on windows. Get it here http://rubyforge.org/frs/?group_id=167

Ruby has “all-in-one” installer for Windows, but it is outdated. As of May 2009, Ruby 1.9.1 is released, the installer is still 1.8.6. If you want the latest version, you need the zip package. But the zip package is missing zlib.dll, libeay32.dll, ssleay32.dll and readline.dll . Here is how to install it on windows.

Download the file

First you download the 1.9 package from http://www.ruby-lang.org/en/downloads/
Choose “Ruby 1.9 xxx binary” instead of “Ruby xxx Installer”.

Install it

Just Unpack the zip to c:/ruby.
Then add c:/ruby/bin to windows PATH.
Open a windows command console and type
gem update --system
Oops, it is broken! The binary is missing some dll files.

Let us fix it

zlib

Download zlib windows binary from
http://gnuwin32.sourceforge.net/packages/zlib.htm

unzip the package, then find a file named “zlib1.dll”.
Copy “zlib1.dll” to your ruby/bin directory AND rename it to zlib.dll
What the heck?! Why renaming it? Because ruby source code reference the dll as zlib.dll. It is common to use alias like this on Linux. Ruby source was coded on Linux.

openssl

Download openssl windows binary from
http://gnuwin32.sourceforge.net/packages/openssl.htm
Unzip it.
Find “libeay32.dll”, copy to ruby/bin. Don’t rename it.
Find “libssl32.dll”, copy to ruby/bin and rename it to ssleay32.dll

readline

Download readline windows binary from
http://gnuwin32.sourceforge.net/packages/readline.htm
Unzip it.
Find “readline5.dll”, copy to ruby/bin and rename it to readline.dll

Done

That is all. Now type
gem update --system
then
gem install rails

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值