卢米姬pg安装错误
我一直在尝试rubymine为一个小型铁路项目,并会真正喜欢调试工作。 该项目是一个Rails API,并使用Postgres在我的Mac上与El Capitan一起运行。 我遇到的问题是Rubymine抱怨'在SDK中找不到导轨'卢米姬pg安装错误
我认为解决方案是从Rubymine菜单运行软件包安装。 不过,始终未能在安装PG:
....
Using hashie 3.4.3
Using multi_json 1.11.2
Using multi_xml 0.5.5
Using newrelic_rpm 3.14.2.312
Installing pg 0.18.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20160617-92261-aw26bh.rb extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib
extconf failed, exit code 1
...
Using faraday 0.9.2
Using hashie-forbidden_attributes 0.1.1
Using httparty 0.13.7
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
我已经试过无数的堆栈溢出的其他解决方案,包括: Bundler::GemNotFound: Could not find rake-10.3.2 in any of the sources An error occurred while installing pg (0.17.1), and Bundler cannot continue
,并已在我的机器上安装的Postgres(我认为)用应用程序和酿造。
为使这项工作任何想法,将不胜感激!
我不认为错误是RubyMine的相关;我认为这是与系统相关的。
也就是说,如果你在命令行上做gem install pg
,我怀疑你会得到同样的错误。
我用rvm
,它就可以工作。它安装必要的系统库。 (这就是说,别人有不时困难的时间。)
如果您有兴趣使用RVM,谷歌“安装RVM”获得的链接安装说明。
这就是说,你应该确保RubyMine的配置为您的项目中使用您所使用的命令行上同一红宝石。这样,您将在两种环境中获得一致的结果。
另外。仅供参考,您可以发送电子邮件[email protected]
获取RubyMine问题。
这就是我在想的,但令人惊讶的是,在命令行上安装pg的工作很好。它的唯一在卢西米昂bundler->安装,有一个问题 将检查rvm谢谢! –
如果您可以发布整个输出(最好格式化为代码,请参阅[格式化](http://stackoverflow.com/help/formatting)),您将节省大量猜测。 – grochmal
你有没有试过安装[railsintaller](http://railsinstaller.org/en)?这就是我做了什么,它对rubymine – mrvncaragay
@grochmal好点,我已经添加了其他相关的输出,只是没有列出所有其他宝石安装和这样的 –