2

I am attempting to install ruby 1.9 using pik. Here is the error

pik install ruby 1.9 -d

There was an error. Error: private method `gsub' called for nil:NilClass

in: pik/commands/install_command.rb:24:in `execute' in: pik_runner:33

The error seems similar to pik Error: private method `gsub' called for nil:NilClass and Error: private method `gsub' called for nil:NilClass with pik install ruby 1.9.3, but I installed jRuby with no problem.

I have seen what seems to be the same error referenced on the pik github page , but it is not solved.

I have also seen a SO answer that said that this is an issue with pik that will not be solved, if this is the case, what is the best way to add the second version of ruby?

Community
  • 1
  • 1
Btuman
  • 881
  • 2
  • 9
  • 37

1 Answers1

0

So, one of the better answers, is to do so in an environment other than windows. Installing virtualbox and/or vagrant and using ruby from a linux environment is much more often the preferred solution to this.

Alternate to this, basically all you need to do to install another version of ruby is install it to another directory, and when you want to use that version of ruby in windows, alter your path statement so that version of ruby is the one in your path rather than the previously installed version.

When I've had to do this, begrudginly, in windows, I've used a single path in my windows environment, but, instead used NTFS junctions to put the correct folder in the correct location to match the path, and then crafted a batch file to remove and add the correct junction for the specific version of ruby that I wanted running.

Hope this helps.

Nick
  • 11
  • 1