首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >bundle安装中的Postgresql错误

问bundle安装中的Postgresql错误
EN

Stack Overflow用户
提问于 2013-08-21 04:54:39
回答 1查看 508关注 0票数 1

我认为这是一个常见的问题,但我在互联网上找到的解决方案并不适合我。当我在run文件中使用本节运行包安装时

代码语言:javascript
复制
group :production, :staging do
  gem "pg"
end

group :development, :test do
  gem "sqlite3-ruby", :require => "sqlite3"
end

我得到以下错误

代码语言:javascript
复制
creating Makefile

make
compiling gvl_wrappers.c
compiling pg.c
pg.c: In function ‘Init_pg_ext’:
pg.c:375: error: ‘PQPING_OK’ undeclared (first use in this function)
pg.c:375: error: (Each undeclared identifier is reported only once
pg.c:375: error: for each function it appears in.)
pg.c:377: error: ‘PQPING_REJECT’ undeclared (first use in this function)
pg.c:379: error: ‘PQPING_NO_RESPONSE’ undeclared (first use in this function)
pg.c:381: error: ‘PQPING_NO_ATTEMPT’ undeclared (first use in this function)
make: *** [pg.o] Error 1


Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p194/gems/pg-0.16.0 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194/gems/pg-0.16.0/ext/gem_make.out

根据我所发现的,下一步是运行locate pg_config,然后将位置放在gem install pg命令行语句之后。但是,我得到了这个错误:

代码语言:javascript
复制
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.

然后运行sudo命令,并得到最后一个错误.

代码语言:javascript
复制
launchctl: Couldn't stat("/System/Library/LaunchDaemons/com.apple.locate.plis"): No such file or directory
nothing found to load

这是我第一次尝试使用这种技术,对Mac来说也是全新的。任何帮助都将不胜感激。谢谢!

编辑

我试图遵循就在这里关于这个错误的建议。

EN

回答 1

Stack Overflow用户

发布于 2013-08-21 15:00:39

看起来,不管你的宝石文件怎么说,你是想在本地安装postgres吗?

真的,这就是你应该做的。在生产中使用与您在本地使用的数据库不同的数据库确实不是最优的。我强烈建议只在任何地方使用Postgres,并删除sqlite。

在Mac上,通往涅盘的最简单的方法就是安装Postgress.app。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18349114

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档