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

Developing a RESTful API with Node.js, Express.js, MongoDB, and TypeScript

The ability to create reliable APIs is essential in today's web development environment. I'll show…

4 weeks ago

XML in REST API response and SOAP XML.

The difference between XML that we get in response to any REST API and XML…

6 months ago

How to install and configure Apache2 on WSL2?

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

10 months ago

How to install NVM on Windows?

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

11 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…

1 year ago

DreamHost Web Hosting

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

2 years ago