我想将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
答案 0 :(得分:6)
安装文档时发生了故障。这个文档容易出错,无论如何你可能永远都不会读它。安装需要时间和空间,但是失败将留下一个有用的宝石,所以你可以在这里。
尝试此操作以跳过doc installs:
gem install --no-rdoc --no-ri pg
对其他gem安装使用相同的模式。
答案 1 :(得分:2)
在我看来,实际上已经安装了宝石。这是后来发生的文件,它导致它爆炸。如果你做“宝石列表”,你能看到它被安装?如果是这样,你应该可以正常使用它......
它说:
Successfully installed pg-0.14.1-x86-mingw32
1 gem installed