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

AI Prompt Engineering Bible (7 Books in 1) – Master ChatGPT & Generative AI

Artificial Intelligence is transforming how we work, create, and earn. But most people get stuck…

4 months ago

How Digital Transformation Services Drive Business Growth

In today’s fast-paced world, businesses can no longer rely solely on traditional methods to stay…

4 months ago

How to Add an Addon Domain in GoDaddy with Web Hosting Deluxe

Add an Addon Domain in GoDaddy with Web Hosting Deluxe (Step-by-Step Guide). If you are…

6 months ago

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…

8 months ago

XML in REST API response and SOAP XML.

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

1 year ago

How to install and configure Apache2 on WSL2?

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

1 year ago