简体   繁体   中英

pik Error: private method `gsub' called for nil:NilClass

I´m getting an error when adding JRuby 1.3.1 to pik. Error:

Error: private method `gsub' called for nil:NilClass

this is my path environment variable:

C:\Users\Owner>echo %path%
C:\Program Files\Java\jdk1.7.0_05\bin;c:\jruby-1.7.0.preview1\bin;C:\jruby-1.3.1\bin;c:\pik

this is when trying to add 1.3.1 version:

C:\Users\Owner>pik add C:\jruby-1.3.1\bin

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

  in: pik/commands/command.rb:124:in `get_version'
  in: pik/commands/add_command.rb:23:in `add'
  in: pik/commands/add_command.rb:13:in `execute'
  in: pik_runner:33

It´s not the case when adding JRuby 1.7.0 version.

I have added JRuby 1.3.1 before to pik, but I don´t know what might be causing this error this time. Any ideas?

I run the command pik run PATH with this result:

C:\Users\Owner>pik run PATH
Cannot locate Java installation, specified by JAVA_HOME:
C:\Program Files\Java\jdk1.7.0_05\**bin**

So added to environment variables -> User variables

JAVA_HOME C:\Program Files\Java\jdk1.7.0_05

Now JRuby 131 has been added to my pik.

Regards

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM