问题描述
在Windows 7机器上,我已经安装了jruby 1.6.7,然后使用'gem install pik'安装了pik.然后,我运行了pik_install C:\ bin,它正确安装了pik.我可以正确运行"pik ls"命令.
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)...
C:\Users\nir>pik ls* 167: jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM)...
我的路径是:-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;
但是,当我运行"pik install ruby 1.9.3"命令时,出现以下错误:-C:\Users\nir>pik install ruby 1.9.3
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
出现错误:
Error: private method 'gsub' called for nil:NilClass
in: pik/commands/install_command.rb:24:in `execute'
in: pik_runner:33`
---已安装的pik版本为0.2.8.而且我已经禁用了防火墙设置.
--- The pik version that got installed was 0.2.8. And I have disabled the firewall settings.
任何帮助将不胜感激.
推荐答案
此问题已解决.这与防火墙设置有关.
This issue has been resolved. It was related to firewall settings.
我之前在.gemrc文件中进行了此设置,包括:-
I earlier did this settings in .gemrc file to include:-
gem:--http-proxy = http://ourproxyserveraddress.com:8080
gem: --http-proxy=http://ourproxyserveraddress.com:8080
但是,它没有用.以下设置解决了该问题:-
However, it did not work. The below settings fixed the issue :-
1)控制面板\系统和安全性\系统(我的电脑\系统属性)->高级系统设置.
1) Control Panel\System and Security\System(My Computer\system properties) -> Advanced System Settings.
2)创建一个包含代理服务器的IP地址和端口号的系统环境变量HTTP_PROXY.您将在浏览器设置-工具->连接-> LAN设置->代理服务器中找到有关代理服务器的信息
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
这篇关于错误:使用pik install ruby 1.9.3调用nil:NilClass的私有方法`gsub'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!