foldrr's weblog

旧ブログ http://d.hatena.ne.jp/foldrr/

Ruby の PostgreSQL ドライバをインストールする

C で実装したライブラリをインストールする場合。
だが、エラーが起きてインストールできない。

$ gem install postgres
WARNING:  RubyGems 1.2+ index not found for:


RubyGems will revert to legacy indexes degrading performance.
ERROR:  Error installing postgres:
        ERROR: Failed to build gem native extension.

c:/core/bin/ruby/bin/ruby.exe extconf.rb install postgres
checking for main() in /ms/libpq.lib... no
*** 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 で実装したライブラリをインストールする場合。

$ gem install postgres-pr
Successfully installed postgres-pr-0.6.1
1 gem installed