我刚刚在 Debian Squeeze 服务器上安装了 Ruby 1.9 和 Rails 3 的新副本。Rails Web 应用程序需要连接到远程 Postgres 数据库,因此我尝试安装 Postgres 适配器,但似乎安装程序正在寻找本地 PostgreSQL 数据库和不存在的配置,因为 Postgres 数据库位于不同的位置主持人。
当实际的 Postgres 数据库位于另一台机器上时,有人可以解释如何安装 Postgres 适配器吗?
谢谢
gem1.9.1 install pg
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 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.