Thursday, April 17, 2014

Installing Ruby (1.9.3) on my Windows 8.1

I installed Ruby on my Windows 8.1. I installed version 1.9.3 because 2.x is said to be not fully ready on Windows platform. I also installed related software packages: DevKit and an editor/IDE RubyMine.


RubyIntaller for Windows:
Ruby on Windows Guides:


I used RubyInstaller to install Ruby. I installed 1.9x because 2.x was not mature for Windows at this time.

Download RubyInstaller and DevKit from

Double click the downloaded executable (rubyinstaller-1.9.3-p545.exe) to install Ruby.

Test it in the command line terminal.
C:\>ruby --version
ruby 1.9.3p545 (2014-02-24) [i386-mingw32]
irb(main):001:0> 1+2
=> 3
irb(main):002:0> exit


(I downloaded a self-extracting DevKit when I downloaded RubyInstaller above. Since I am using Ruby 1.9x, rather than 2.x, I downloaded DevKit for that version.)

Install DevKit by double clicking downloaded self-extracting executable (DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe) in to my installation directory, which I decided to use "C:\DevKit".

Now run the following three programs to complete DevKit installation.
Adding the DevKit to PATH...

C:\DevKit>ruby dk.rb init
[INFO] found RubyInstaller v1.9.3 at C:/Ruby193
Initialization complete!
Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.

C:\DevKit>ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Ruby193'
[INFO] Installing 'C:/Ruby193/lib/ruby/site_ruby/devkit.rb'

Let's test.
bash-3.1$ gcc --version
gcc.exe (tdm-1) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software...
bash-3.1$ exit


I installed RubyMine, a Ruby editor/IDE. It is not a free but reasonably priced. I was looking for a Ruby editor/IDE that includes a visual debugger, and RubyMine is one of few that have this feature.
First, download its latest installer from
Then double click the installer (RubyMine-6.3.exe) to install.

In order to use its debugger, I also installed the following GEMs.

C:\>gem install linecache19
Fetching: linecache19-0.5.12.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed linecache19-0.5.12
1 gem installed
Installing ri documentation for linecache19-0.5.12...
Installing RDoc documentation for linecache19-0.5.12...

C:\>gem install ruby-debug-base19x --pre
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed ruby-debug-base19x-0.11.30.pre15
1 gem installed
Installing ri documentation for ruby-debug-base19x-0.11.30.pre15...
Installing RDoc documentation for ruby-debug-base19x-0.11.30.pre15...

C:\>gem install ruby-debug-ide
Fetching: ruby-debug-ide-0.4.22.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ruby-debug-ide-0.4.22
1 gem installed
Installing ri documentation for ruby-debug-ide-0.4.22...
Installing RDoc documentation for ruby-debug-ide-0.4.22...

I did a simple test. Launched Rubymine by double clicking its desktop icon. Created a project "firstproject". Created a new file "hello.rb" Then wrote a hello code as follows and ran.

1 comment:

  1. Nicely written article. Thanks. QUESTION: Does anyone know if the latest version of Ruby (2.2.1?) works any better than 2.0 did in terms of working with Windows 8.1 or IE11? We too had issues with getting 2.0 to work with such issues with 1.9.3, with the browser anyway. I have some Ruby 1.9.3 code that works well on my Windows 7/IE11 workstation, but fails horribly on a Windows 8.1/IE11 platform. The Application is using ANGULAR edit boxes, which I can SET with values using Ruby 1.9.3 under Windows 7. But I have NO luck with Windows 8.1 using the exact same scripts, and browser. I'm thinking it must be the GESTURE features of Windows 8.1 causing the problem. Does anyone know what might be causing this inability to enter data in ANGULAR Edit Boxes with the Ruby SET method under the Windows 8.1 operating system? I’m looking for an answer other than “Windows 8.1 does not support Ruby 1.9.3”, if possible. Would creating custom Attributes in the DOM such as unique IDs help with input to these ANGULAR edit boxes?