Monday, March 14, 2011

Installing Ruby DevKit for Windows

Installed Ruby DevKit for Windows.

1. Download.
http://rubyinstaller.org/downloads/
The file downloaed is: DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe

2. Right-click it and select "Smart extract here" option to unzip into a newly created folder.
The newly created folder: DevKit-tdm-32-4.5.1-20101214-1400-sfx

3. Rename the folder to "DevKit"

4. Place it under C:\

C:\DevKit>dir
 Volume in drive C is HD01-1TB
 Volume Serial Number is 5ED7-0C7F

 Directory of C:\DevKit

03/16/2011  05:27 AM    <DIR>          .
03/16/2011  05:27 AM    <DIR>          ..
03/16/2011  05:27 AM    <DIR>          bin
03/16/2011  05:27 AM               297 devkitvars.bat
03/16/2011  05:27 AM               361 devkitvars.ps1
03/16/2011  05:27 AM            10,380 dk.rb
03/16/2011  05:27 AM    <DIR>          etc
03/16/2011  05:27 AM    <DIR>          include
03/16/2011  05:27 AM    <DIR>          lib
03/16/2011  05:27 AM             2,238 m.ico
03/16/2011  05:27 AM    <DIR>          mingw
03/16/2011  05:27 AM             7,167 msys.bat
03/16/2011  05:27 AM            37,758 msys.ico
03/16/2011  05:27 AM             2,740 perllocal.pod
03/16/2011  05:27 AM    <DIR>          postinstall
03/16/2011  05:27 AM    <DIR>          sbin
03/16/2011  05:27 AM    <DIR>          share
               7 File(s)         60,941 bytes
              10 Dir(s)  607,934,238,720 bytes free

5. Add "C:\DevKit\bin" to shell's PATH environment.

6. Restart the Command line and check the PATH.
C:\DevKit>bash
bash-3.1$ ls
bin             dk.rb    lib    msys.bat       postinstall
devkitvars.bat  etc      m.ico  msys.ico       sbin
devkitvars.ps1  include  mingw  perllocal.pod  share
bash-3.1$ exit

7.[NEW] Run the following DevKit ruby command.
See "Setting up Rails 3 with PostgreSQL on Windows" By netpie

C:\>cd DevKit

C:\DevKit>ruby dk.rb init
[INFO] found RubyInstaller v1.8.6 at C:/Ruby186
[INFO] found RubyInstaller v1.8.7 at C:/Ruby187
[INFO] found RubyInstaller v1.9.1 at C:/Ruby191
[INFO] found RubyInstaller v1.9.2 at C:/Ruby192

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] Installing 'C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/defaults/operating_system.rb'
[INFO] Installing 'C:/Ruby186/lib/ruby/site_ruby/devkit.rb'
[INFO] Updating convenience notice gem override for 'C:/Ruby187'
[INFO] Installing 'C:/Ruby187/lib/ruby/site_ruby/devkit.rb'
[INFO] Installing 'C:/Ruby191/lib/ruby/site_ruby/1.9.1/rubygems/defaults/operating_system.rb'
[INFO] Installing 'C:/Ruby191/lib/ruby/site_ruby/devkit.rb'
[INFO] Updating convenience notice gem override for 'C:/Ruby192'
[INFO] Installing 'C:/Ruby192/lib/ruby/site_ruby/devkit.rb'

16 comments:

  1. great article, thank you very much

    ReplyDelete
  2. thank you veeeeeeeeeeeeeery much ;)

    ReplyDelete
  3. thank you very much this post is really useful.
    thanks again

    ReplyDelete
  4. couldn't get DevKit working until I found this article. Many thanks!

    ReplyDelete
  5. oh thank youuuuuuuuuuuuu

    ReplyDelete
  6. thank you!!! :D

    ReplyDelete
  7. thank u soo much , its very helpful !!!

    -Anuhya

    ReplyDelete
  8. Can someone please tell me what "shell's PATH environment" is?

    ReplyDelete
  9. ^
    ^
    In Windows 7, go to Control Panel >> System >> Advanced system settings >> Environment Variables...

    Find System variables that has the name Path. That is the one you need to add ;C:\DevKit\bin to the end of it.

    ReplyDelete
  10. Works Great. Thank you :)

    ReplyDelete
  11. This comment has been removed by a blog administrator.

    ReplyDelete