2

我想将 gem pg 安装到我的 windows 7 机器上:

gem install pg

但它每次都失败并出现以下错误:

Fetching: pg-0.14.1-x86-mingw32.gem (100%)
Successfully installed pg-0.14.1-x86-mingw32
1 gem installed
Installing ri documentation for pg-0.14.1-x86-mingw32...
Enclosing class/module 'rb_mPG' for class Connection not known
Enclosing class/module "rb_cPGconn" for alias close finish not known
Enclosing class/module "rb_cPGconn" for alias query exec not known
Enclosing class/module "rb_cPGconn" for alias escape escape_string not known
Enclosing class/module "rb_cPGconn" for alias nonblocking? isnonblocking not kno
wn
Enclosing class/module "rb_cPGconn" for alias client_encoding= set_client_encodi
ng not known
Enclosing class/module "rb_cPGconn" for alias notifies_wait wait_for_notify not
known
Enclosing class/module "rb_cPGconn" for alias async_query async_exec not known
Enclosing class/module "rb_cPGconn" for alias locreat lo_creat not known
Enclosing class/module "rb_cPGconn" for alias locreate lo_create not known
Enclosing class/module "rb_cPGconn" for alias loimport lo_import not known
Enclosing class/module "rb_cPGconn" for alias loexport lo_export not known
Enclosing class/module "rb_cPGconn" for alias loopen lo_open not known
Enclosing class/module "rb_cPGconn" for alias lowrite lo_write not known
Enclosing class/module "rb_cPGconn" for alias loread lo_read not known
Enclosing class/module "rb_cPGconn" for alias lolseek lo_lseek not known
Enclosing class/module "rb_cPGconn" for alias lo_seek lo_lseek not known
Enclosing class/module "rb_cPGconn" for alias loseek lo_lseek not known
Enclosing class/module "rb_cPGconn" for alias lotell lo_tell not known
Enclosing class/module "rb_cPGconn" for alias lotruncate lo_truncate not known
Enclosing class/module "rb_cPGconn" for alias loclose lo_close not known
Enclosing class/module "rb_cPGconn" for alias lounlink lo_unlink not known
Installing RDoc documentation for pg-0.14.1-x86-mingw32...
Enclosing class/module 'rb_mPG' for class Connection not known
Enclosing class/module "rb_cPGconn" for alias close finish not known
Enclosing class/module "rb_cPGconn" for alias query exec not known
Enclosing class/module "rb_cPGconn" for alias escape escape_string not known
Enclosing class/module "rb_cPGconn" for alias nonblocking? isnonblocking not kno
wn
Enclosing class/module "rb_cPGconn" for alias client_encoding= set_client_encodi
ng not known
Enclosing class/module "rb_cPGconn" for alias notifies_wait wait_for_notify not
known
Enclosing class/module "rb_cPGconn" for alias async_query async_exec not known
Enclosing class/module "rb_cPGconn" for alias locreat lo_creat not known
Enclosing class/module "rb_cPGconn" for alias locreate lo_create not known
Enclosing class/module "rb_cPGconn" for alias loimport lo_import not known
Enclosing class/module "rb_cPGconn" for alias loexport lo_export not known
Enclosing class/module "rb_cPGconn" for alias loopen lo_open not known
Enclosing class/module "rb_cPGconn" for alias lowrite lo_write not known
Enclosing class/module "rb_cPGconn" for alias loread lo_read not known
Enclosing class/module "rb_cPGconn" for alias lolseek lo_lseek not known
Enclosing class/module "rb_cPGconn" for alias lo_seek lo_lseek not known
Enclosing class/module "rb_cPGconn" for alias loseek lo_lseek not known
Enclosing class/module "rb_cPGconn" for alias lotell lo_tell not known
Enclosing class/module "rb_cPGconn" for alias lotruncate lo_truncate not known
Enclosing class/module "rb_cPGconn" for alias loclose lo_close not known
Enclosing class/module "rb_cPGconn" for alias lounlink lo_unlink not known
4

2 回答 2

6

安装文档失败。该文档容易出错,您可能永远也不会阅读它。安装需要时间和空间,但失败会留下工作的 gem,所以你在这里没问题。

试试这个跳过文档安装:

gem install --no-rdoc --no-ri pg

对其他 gem 安装使用相同的模式。

于 2012-11-30T17:24:44.287 回答
2

在我看来,gem 已实际安装。是后来的文件导致它爆炸。如果你做'gem list',你能看到它正在安装吗?如果是这样,您应该可以正常使用它...

它说:

Successfully installed pg-0.14.1-x86-mingw32
1 gem installed
于 2012-11-30T17:19:59.330 回答