【发布时间】:2014-01-12 07:03:41
【问题描述】:
我刚刚安装了Rails 4.0.2,在创建新应用程序时,在捆绑阶段我得到:
Installing pg (0.17.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/Dee/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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.
我该如何解决这个问题?
【问题讨论】:
-
您可能想要添加一个 osx 标签。该解决方案似乎可能与您的操作系统特别相关。
-
您可能想访问 . stackoverflow.com/questions/3116015/… 。希望这些解决方案之一有所帮助
标签: ruby-on-rails macos postgresql ruby-on-rails-4