我跑bundle update
(這樣我就可以安裝導軌)安裝PG(0.14.1),但得到這個錯誤:「捆綁更新」無法以原生擴展
$ bundle update
..... < other stuff ....>
Installing pg (0.14.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/user/.rvm/rubies/ruby-1.9.3-p374/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.
我是新來Ruby
和所有這些,誰能告訴我這裏有什麼問題? 這是在OSX
知道你在這裏運行的是什麼操作系統是非常重要的。 – 2013-02-13 19:01:36
這是OSX(如'/ Users/user/...'應該建議的路徑) – user1508893 2013-02-13 19:03:46
看起來你缺少postgres-dev文件,並且在你的gem文件中有一個需要它的gem。 – winglerw28 2013-02-13 19:06:12