【问题标题】:Error fetching data: Errno::ENETUNREACH: A socket operation was attempted to an unreachable network. Error in installing gem [closed]获取数据时出错:Errno::ENETUNREACH:尝试对无法访问的网络进行套接字操作。安装 gem 时出错 [关闭]
【发布时间】:2013-08-27 06:23:39
【问题描述】:

我是 Ruby on rails 的新手。我的后端是 PostgreSql。当我尝试使用命令安装 postgre sql 时

$ gem install pg
$ gem install ruby-postgres 

我收到以下错误。

WARNING:  Error fetching data: Errno::ENETUNREACH: A socket operation was attempted to an unreachable network. - connect(2) (http://rubygems.org/l
atest_specs.4.8.gz)
ERROR:  Could not find a valid gem 'pg' (>= 0) in any repository
ERROR:  Possible alternatives: pg

我在 Windows 7 平台上使用 Eclipse IDE。我已使用以下命令设置代理

$ http_proxy="http:/192.168.xx.xxx:xxxx"

但它仍然无法正常工作。我的朋友this,thisthis

【问题讨论】:

  • 这个问题似乎是题外话,因为它是关于一个错字

标签: ruby-on-rails postgresql gem


【解决方案1】:

$ http_proxy="http:/192.168.xx.xxx:xxxx"

试试:

$ http_proxy="http://192.168.xx.xxx:xxxx"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-05-14
    • 2018-10-03
    • 1970-01-01
    • 2011-08-30
    • 1970-01-01
    • 2013-01-15
    • 1970-01-01
    相关资源
    最近更新 更多