Tuesday, March 8, 2011

Using pik

I really like pik (a Ruby version management tool for Windows).

I have 4 versions of Ruby installed on my Vista machine.
C:\>dir ruby*
 Directory of C:\
02/13/2011  12:30 AM    <DIR>          Ruby186
02/13/2011  12:20 AM    <DIR>          Ruby187
02/15/2011  03:21 AM    <DIR>          Ruby191
02/13/2011  12:50 AM    <DIR>          Ruby192

(1) I can use pik to list all installed Ruby versions.
C:\>pik list
  186: ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]
  187: ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]
  191: ruby 1.9.1p430 (2010-08-16 revision 28998) [i386-mingw32]
  192: ruby 1.9.2p136 (2010-12-25) [i386-mingw32]


(2) I can switch from one version to another easily.
C:\>
C:\>pik use 192

C:\>ruby -v
ruby 1.9.2p136 (2010-12-25) [i386-mingw32]

C:\>pik use 186

C:\>ruby -v
ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]

C:\>pik list
* 186: ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]
  187: ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]
  191: ruby 1.9.1p430 (2010-08-16 revision 28998) [i386-mingw32]
  192: ruby 1.9.2p136 (2010-12-25) [i386-mingw32]
The * tells which one is in use currently.


(3) I can install a gem for all version in a single pik command.
C:\>pik gem install ramaze
ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]

============================================================

Thank you for installing Ramaze!
To create a new project:
$ ramaze create yourproject

============================================================
Successfully installed rack-1.2.1
Successfully installed innate-2011.01
Successfully installed ramaze-2011.01.30
3 gems installed
Installing ri documentation for rack-1.2.1...
Installing ri documentation for innate-2011.01...
Installing ri documentation for ramaze-2011.01.30...
Installing RDoc documentation for rack-1.2.1...
Installing RDoc documentation for innate-2011.01...
Installing RDoc documentation for ramaze-2011.01.30...

ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]

============================================================

Thank you for installing Ramaze!
To create a new project:
$ ramaze create yourproject

============================================================
Successfully installed rack-1.2.1
Successfully installed innate-2011.01
Successfully installed ramaze-2011.01.30
3 gems installed
Installing ri documentation for rack-1.2.1...
Installing ri documentation for innate-2011.01...
Installing ri documentation for ramaze-2011.01.30...
Installing RDoc documentation for rack-1.2.1...
Installing RDoc documentation for innate-2011.01...
Installing RDoc documentation for ramaze-2011.01.30...

ruby 1.9.1p430 (2010-08-16 revision 28998) [i386-mingw32]

============================================================

Thank you for installing Ramaze!
To create a new project:
$ ramaze create yourproject

============================================================
Successfully installed rack-1.2.1
Successfully installed innate-2011.01
Successfully installed ramaze-2011.01.30
3 gems installed
Installing ri documentation for rack-1.2.1...
Installing ri documentation for innate-2011.01...
Installing ri documentation for ramaze-2011.01.30...
Updating class cache with 0 classes...
Installing RDoc documentation for rack-1.2.1...
Installing RDoc documentation for innate-2011.01...
Installing RDoc documentation for ramaze-2011.01.30...

ruby 1.9.2p136 (2010-12-25) [i386-mingw32]

============================================================

Thank you for installing Ramaze!
To create a new project:
$ ramaze create yourproject

============================================================
Successfully installed rack-1.2.1
Successfully installed innate-2011.01
Successfully installed ramaze-2011.01.30
3 gems installed
Installing ri documentation for rack-1.2.1...
Installing ri documentation for innate-2011.01...
Installing ri documentation for ramaze-2011.01.30...
Installing RDoc documentation for rack-1.2.1...
Installing RDoc documentation for innate-2011.01...
Installing RDoc documentation for ramaze-2011.01.30...

No comments:

Post a Comment