ruby-pgをインストールした 覚え書き

Posted on 7月 30, 2008 | Category: PostgreSQL | このエントリーを含むはてなブックマーク この記事をクリップ! コメントを見る

まずhttp://rubyforge.org/frs/?group_id=3214&release_id=18590
からpg-0.7.9.2008.03.18.gemをダウンロードしてくる。

でgemでインストールする。
[root@localhost ~]# gem install pg-0.7.9.2008.03.18.gem
Building native extensions.  This could take a while…
ERROR:  Error installing pg-0.7.9.2008.03.18.gem:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install pg-0.7.9.2008.03.18.gem
sh: pg_config: command not found
ERROR: can’t find pg_config.
HINT: Make sure pg_config is in your PATH
*** 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=/usr/local/bin/ruby

Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.0/gems/pg-0.7.9.2008.03.18 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.0/gems/pg-0.7.9.2008.03.18/ext/gem_make.out

エラーが・・・・・

[root@localhost ~]# gem list

*** LOCAL GEMS ***

gem listで確認しても何も入ってない
ログを再度確認
sh: pg_config: command not found
ERROR: can’t find pg_config.
HINT: Make sure pg_config is in your PATH
と出てるのでおとなしく パスに/usr/local/pgsql/bin
を追加する

[root@localhost ~]# export PATH=$PATH:/usr/local/pgsql/bin

[root@localhost ~]# gem install pg-0.7.9.2008.03.18.gem
Building native extensions.  This could take a while…
Successfully installed pg-0.7.9.2008.03.18
1 gem installed
Installing ri documentation for pg-0.7.9.2008.03.18…
Installing RDoc documentation for pg-0.7.9.2008.03.18…

入ったかな?確認

[root@localhost ~]# gem list

*** LOCAL GEMS ***

pg (0.7.9.2008.03.18)

使い方はこれから勉強開始し

» Filed Under PostgreSQL

Leave a Reply

Copyright © 2005 Yourcopyright. All Rights Reserved | Design: YGoY