Eric Guo's

in HTML5, JavaScript, Ruby & Rails, Python, and Cloud MES!

Notes to Upgrade Ruby 2.0.0-p195 in Windws 7


Finally, I go to ruby 2.0, after the first patch p195 release, roughly three month the ruby 2.0 released in its 20 years celebration. I using the version and also it’s devkit, the detail installation procedure is very like previous 1.9.3, so won’t repeat here now, but I do found some trick which should in fact including in the official document but not, so I would list as below:

  1. Need manually install the sqlite3.

    1. run C:\DevKit\devkitvars.bat
    2. mkdir c:\temp
    3. download to c:\temp
    4. c:\Temp>bsdtar --lzma -xf sqlite-
    5. c:\Temp>gem install sqlite3 --platform=ruby -- --with-opt-dir=C:/Temp
  2. Using below .gemrc and reinstall the gems like yajl-ruby, win32console or bcrypt-ruby if you found the x86-mingw32 version can not work out of box.

edit/create the .gemrc as below content
:backtrace: false
:benchmark: false
:bulk_threshold: 1000
:update_sources: true
:verbose: true
gem: --no-document --platform=ruby
  1. You may want to comment out the “DL is deprecated, please use Fiddle” warning at C:\Ruby200\lib\ruby\2.0.0\dl.rb since it’s annoy and you are not the irb/pry or some other gems code owner…

Ruby 2.0 performance is somewhat improved and it’s worth to using it right now.

  1. Create Environment Variable SSL_CERT_FILE and point to cacert.pem, example C:\Ruby200\cacert.pem.