Misc.

How to register Ruby environments with pik?

pik add command is used to register your installed ruby environments with pik. For example, I have Ruby 1.9.3, and 2.0.0 installed on my windows, so I used the following in a Command Prompt:

> pik add C:\Ruby193\bin
INFO: Adding:  [ruby-]1.9.3-p392
      Located at:  C:\Ruby193\bin

> pik add C:\Ruby200\bin
INFO: Adding:  [ruby-]2.0.0-p0
      Located at:  C:\Ruby2000\bin

Use the pik list command to list all the ruby interpreters registered with pik:

> pik list
   ruby-1.9.3-p392
   ruby-2.0.0-p0

Make a default Ruby

The pik use command will allow you to switch between your registered ruby interpreters:

> pik use ruby-2.0.0-p0
> ruby -v
ruby 2.0.0p0 (2013-02-024) [i386-mingw32]

Add the –default parameter to set one version as the default:

> pik use ruby-1.9.3-p392 --default

You can use the pik default command to switch to this version:

> pik default
> ruby -v
ruby 1.9.3p392 (2013-02-022) [i386-mingw32]

When you open a command prompt, pik might not automatically loaded, so you will notice that there is no default ruby loaded:

Run the pik default command to load pik or add one particular Ruby interpreter to your user or system PATH environment variable from Control Panel -> System -> Advanced -> Environment Variables

websourceblog

ReactJs, NodeJs, Amazon Web Services, Symfony, Laravel, CodeIgniter, Zend Framework, WordPress, Drupal, Magento, Angular

View Comments

  • You should be a part of a contest for one of the most useful sites online. I most certainly will recommend this website!

Recent Posts

How to install and configure Apache2 on WSL2?

I hope you already have WSL2 installed and enabled. So, setting up Apache2 on WSL2…

4 months ago

How to install NVM on Windows?

Install NVM on Windows Node Js is a JavaScript runtime environment used widely in today’s…

5 months ago

How to reset WSL 2 user’s password?

You can easily reset WSL 2 users' password, by just following the following steps. Open…

9 months ago

DreamHost Web Hosting

DreamHost a web hosting company, founded in 1997. It is offering sort of hosting services,…

1 year ago

How to add submenu or menu in any specific menu option in WordPress programmatically?

Menus in WordPress are highly versatile and can be easily modified to change in your…

2 years ago

Laravel 8 error target class controller does not exist.

Laravel is famous and robust PHP framework, widely used in different type of projects. While…

2 years ago