Error: private method `gsub' called for nil:NilClass with pik install ruby 1.9.3

我的梦境 提交于 2019-12-12 09:57:14

问题


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.


回答1:


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!