, ,

pik is a Ruby version manager for windows. It allows you to run multiple different versions of Ruby such as Ruby1.8 and Ruby1.9.
If you are using Linux, use RVM.

Warning: Don’t use Bash shell or Cygwin due to the path issue instead use the Windows Command prompt.

To install pik, follow the steps below:

C:\Ruby193\bin\>gem install pik
Fetching: pik-0.2.8.gem (100%)
*  If you're upgrading from a version path

    c:\pik_install C:\tools

*  If this is a first-time install, add all the versions of ruby that you want to use with pik
    c:\pik add
    Adding:  186: ruby 1.8.6 (2009-03-31 patchlevel 368) [i386-mingw32]
     Located at:  c:/ruby/186-p368-mingw32/bin

    c:\pik add C:\ruby\IronRuby-091\bin
    Adding:  091: IronRuby on .NET
     Located at:  C:/ruby/IronRuby-091/bin

    C:\pik add C:\ruby\jruby-1.4.0RC1\bin
    Adding:  140: jruby 1.4.0RC1 (ruby 1.8.7 patchlevel 174) (2009-09-30 80c263b) (Java HotSpot(TM) Client VM 1.6.0_14) [x86-java]
     Located at:  C:/ruby/jruby-1.4.0RC1/bin
Successfully installed pik-0.2.8
1 gem installed
Installing ri documentation for pik-0.2.8...
Installing RDoc documentation for pik-0.2.8...

C:\Ruby193\bin>gem list --local
*** LOCAL GEMS ***

actionmailer (3.2.11)
actionpack (3.2.11)
pik (0.2.8)
C:\Ruby193\bin\>pik_install c:\pik
Thank you for using pik.

mkdir -p c:\pik
mkdir -p C:\Users\IBM_ADMIN/.pik
Installing to c:\pik

cp C:/Ruby193/lib/ruby/gems/1.9.1/gems/pik-0.2.8/tools/pik_runner.exe c:\pik
cp C:/Ruby193/lib/ruby/gems/1.9.1/gems/pik-0.2.8/tools/pik.bat c:\pik
cp C:/Ruby193/lib/ruby/gems/1.9.1/gems/pik-0.2.8/tools/pik.ps1 c:\pik

creating C:\Users\sudogem/.pik/.pikrc

pik is installed

The directory you installed to is not in the sytem path.

You will need to add it.
if you want to use pik with git bash, add the following line to your ~/.bashrc:
  [[ -s $USERPROFILE/.pik/.pikrc ]] && source $USERPROFILE/.pik/.pikrc

More info about at https://github.com/vertiginous/pik

C:\Ruby193\bin\>cd /pik
C:\pik\>pik list

C:\>pik help commands
  add             Adds another ruby location to pik.
  alias           manages aliases for ruby versions
  benchmark|bench Runs bencmarks with all versions that pik is aware of.
  default         Switches to the default ruby.
  gem             Runs the gem command with all versions that pik is aware of.
  help            Displays help information.
  implode         Removes your pik configuration.
  info            Displays information about the current ruby version.
  install|in      Downloads and installs different ruby versions.
  list|ls         Lists ruby versions that pik is aware of.
  package         Downloads and installs packages.
  rake            Runs the rake command with all versions that pik is aware of.
  refresh         Refreshes the pik configuration file.
  remove|rm       Removes a ruby location from pik.
  ruby|rb         Runs ruby with all versions that pik is aware of.
  run|exec        Executes shell command with all versions of ruby that pik is aware of.
  system          Switches back to initial system environment.
  uninstall|unin  Deletes a ruby version from the filesystem and removes it from Pik.
  update|up       updates pik.
  use             Switches ruby versions by name.