How to use mutliple ruby version on windows

I have found a nice ruby version manager for windows named pik. It’s pretty easy to install and manage multiple ruby versions.

First install the pik gem:

gem install pik

After installing the pik, you have to use pik_install script to install the pik executable. You must install pik in a different directory other than your rubybin directory.

pik_install C:WindowsSystem32

If the installation gone smooth, you should see like ..

pik is installed

if you want to use pik with git bash, add the following line to your ~/.bashrc:

[[ -s $USERPROFILE/.pik/.pikrc ]] && source $USERPROFILE/.pik/.pikrc

Now you can see the list of available ruby versions by using following commands:

pik list

Add, you can install a ruby version and add to version manager using below command:

pik add C:Ruby192bin

To switch the ruby version use command:

pik switch [Version Name]

That’s all to use multiple version of ruby on windows machine.

Click here to know more about pik

Leave a Comment