On Windows 7 machine, I have installed jruby 1.6.7 and then installed pik with 'gem install pik'. I then ran pik_install C:\bin which installed pik properly. I can run "pik ls" command properly.
C:\Users\nir>pik ls
* 167: jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM)...
My PATH is :-
C:\Users\nir>echo %PATH%
C:\Program Files\Java\jdk1.7.0\bin; C:\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\jruby-1.6.7\bin;C:\cygwin\bin;
However, when I run "pik install ruby 1.9.3" command, I get the following error :-
C:\Users\nir>pik install ruby 1.9.3
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 pik version that got installed was 0.2.8. And I have disabled the firewall settings.
Any help would be highly appreciated.
This issue has been resolved. It was related to firewall settings.
I earlier did this settings in .gemrc file to include:-
gem: --http-proxy=http://ourproxyserveraddress.com:8080
However, it did not work. The below settings fixed the issue :-
1) Control Panel\System and Security\System(My Computer\system properties) -> Advanced System Settings.
2) Create a System environment variable HTTP_PROXY containing the IP address of proxy server and the port number. You will find the information about the proxy server in browser settings - Tools -> Connection -> LAN Settings -> Proxy server
来源:https://stackoverflow.com/questions/11935644/error-private-method-gsub-called-for-nilnilclass-with-pik-install-ruby-1-9-3