[#48737] Ruby1.9.3p194をwindows-xpへのローカルインストール時のエラーについて — eiichi_maekawa@...

13 messages 2012/05/09
[#48740] Re: Ruby1.9.3p194をwindows-xpへのローカルインストール時のエラーについて — "前川 映一" <eiichi_maekawa@...> 2012/05/11

前川です。

[#48741] Re: Ruby1.9.3p194をwindows-xpへのローカルインストール時のエラーについて — eiichi_maekawa@... 2012/05/14

前川です。

[#48750] Re: Ruby1.9.3p194をwindows-xpへのローカルインストール時のエラーについて — eiichi_maekawa@... 2012/05/15

前川です。

[#48746] gem install pg で、PQconnectionUsedPassword チェックが no となる — SHINODA Masanori <shinoda@...>

篠田と申します。初めて投稿します。

16 messages 2012/05/14

[ruby-list:48754] Re: gem install pg で、PQconnectionUsedPassword チェックが no となる

From: SHINODA Masanori <shinoda@...>
Date: 2012-05-15 11:01:09 UTC
List: ruby-list #48754
篠田です。

内海さん、早速のご教示ありがとうございます。
今日はずっと外出しておりましたので、試してみるのが遅くなりました。すみません。

2012年5月15日 7:57 Masahiro Utsumi <utsumi@tte.be>:
> で、先回インストールした時になんとかなったインストール方法は
> 以下でした。Postgresのインストール先やバージョンは違うと思います
> ので読み替えてください。
>
> gem install pg -v '0.12.0' --with-pg-config=/usr/pgsql-9.0/bin/pg_config
> --no-ri --no-rdoc
>
> これで動きますでしょうか。

確かに、私の環境に合わせて、version 0.12.0 をインストールしてみると、

# gem install pg -v '0.12.0' --
--with-pg-config=/vol1/usr/local/bin/pg_config --no-ri --no-rdoc
Fetching: rake-compiler-0.8.1.gem (100%)
Fetching: pg-0.12.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed rake-compiler-0.8.1
Successfully installed pg-0.12.0
2 gems installed
Installing ri documentation for rake-compiler-0.8.1...
Installing ri documentation for pg-0.12.0...
unable to convert "\xC5" to UTF-8 in conversion from ASCII-8BIT to
UTF-8 to US-ASCII for History.rdoc, skipping
unable to convert "\xEF" to UTF-8 in conversion from ASCII-8BIT to
UTF-8 to US-ASCII for ext/pg.c, skipping
Installing RDoc documentation for rake-compiler-0.8.1...
Installing RDoc documentation for pg-0.12.0...
unable to convert "\xC5" to UTF-8 in conversion from ASCII-8BIT to
UTF-8 to US-ASCII for History.rdoc, skipping
unable to convert "\xEF" to UTF-8 in conversion from ASCII-8BIT to
UTF-8 to US-ASCII for ext/pg.c, skipping

このように、インストールは成功したようです。

ただ、bundle を実行すると、最新の 0.13.2 を取ってくるのですが、これだと同じようにインストー
ルに失敗します。

9# bundle
Fetching gem metadata from https://rubygems.org/......
Fetching gem metadata from https://rubygems.org/..
Using rake (0.9.2.2)
<略>
Installing pg (0.13.2) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.

        /usr/local/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... yes
checking for PQconnectionUsedPassword()... no
Your PostgreSQL is too old. Either install an older version of this
gem or upgrade your database.
*** 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
        --with-pg
        --without-pg
        --with-pg-dir
        --without-pg-dir
        --with-pg-include
        --without-pg-include=${pg-dir}/include
        --with-pg-lib
        --without-pg-lib=${pg-dir}/lib
        --with-pg-config
        --without-pg-config
        --with-pg_config
        --without-pg_config
        --with-pqlib
        --without-pqlib


Gem files will remain installed in
/usr/local/lib/ruby/gems/1.9.1/gems/pg-0.13.2 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/pg-0.13.2/ext/gem_make.out
An error occured while installing pg (0.13.2), and Bundler cannot continue.
Make sure that `gem install pg -v '0.13.2'` succeeds before bundling.

# gem install pg -v '0.13.2' --
--with-pg-config=/vol1/usr/local/bin/pg_config --no-ri --no-rdoc

のように、手動で gem コマンドを実行した場合も同様のエラーとなります。

う〜ん(^^;

「Railsをインストールするたびにここで引っかかります」というのもわかる気がします。
最新版はすんなり入らないんですね・・・(^^;

-- 
SHINODA Masanori <shinoda@netandfield.com>
Net & Field Co.,Ltd. Internet Service Section
Phone 082-231-0760  Fax 082-231-0776
Portable... 090-6419-9919

In This Thread