我后面的防火墙以ntlm模式运行Microsoft ISA服务器。哈希任何人成功地获得他们的Ruby宝石安装/更新通过Ruby SSPI宝石或其他方法?

... 还是我太懒了?

注意:rubysspi-1.2.4不起作用。

这也适用于“igem”,IronRuby项目的一部分


当前回答

rubysspi-1.3.1适用于我的Windows 7,使用这一页的说明:

http://www.stuartellis.eu/articles/installing-ruby/

其他回答

对于任何使用SSH隧道的人;你可以创建一个使用SOCKS代理的gem命令版本:

Install socksify with gem install socksify (you'll need to be able to do this step without proxy, at least) Copy your existing gem exe cp $(command which gem) /usr/local/bin/proxy_gem Open it in your favourite editor and add this at the top (after the shebang) require 'socksify' if ENV['SOCKS_PROXY'] require 'socksify' host, port = ENV['SOCKS_PROXY'].split(':') TCPSocket.socks_server = host || 'localhost' TCPSocket.socks_port = port.to_i || 1080 end Set up your tunnel ssh -D 8123 -f -C -q -N user@proxy Run your gem command with proxy_gem SOCKS_PROXY=localhost:8123 proxy_gem push mygem

与其编辑批处理文件(对于其他Ruby宝石,例如Bundler,您可能不得不这样做),不如只做一次,并正确地进行。

在Windows上,在我的公司代理之后,我所要做的就是将HTTP_PROXY环境变量添加到我的系统中。

开始->右键单击计算机->属性 选择“高级系统设置” 单击“高级->环境变量” 创建一个名为“HTTP_PROXY”的新系统变量,并将其值设置为您的代理服务器 重新启动或注销,然后重新登录

根据你的身份验证要求,HTTP_PROXY值可以简单到:

http://proxy-server-name

或者像其他人指出的那样更复杂

http://username:password@proxy-server-name:port-number

这对我来说在Windows盒子里很管用:

set HTTP_PROXY=http://server:port
set HTTP_PROXY_USER=username
set HTTP_PROXY_PASS=userparssword
set HTTPS_PROXY=http://server:port
set HTTPS_PROXY_USER=username
set HTTPS_PROXY_PASS=userpassword

我有一个包含这些行的批处理文件,当我需要它时,我用它来设置环境值。

在我的例子中,诀窍是HTTPS_PROXY集。没有它们,我总是得到一个407代理身份验证错误。

这完全有效:

gem install --http-proxy http://COMPANY.PROXY.ADDRESS $gem_name

我尝试了其中的一些解决方案,但没有一个奏效。我终于找到了一个适合我的解决方案:

gem install -p http://proxy_ip:proxy_port rails

使用-p参数传递代理。我使用的是Gem版本1.9.1。