アカベコマイリ

HEAR NOTHING SEE NOTHING SAY NOTHING

Redmine 2.2.3 へ更新しようとして失敗

March 20, 2013開発Redmine

忙しくて長らく放置していた Redmine 2.2.3 の更新に着手。

  • 訂正 - 2013/2/24
    • この記事で更新対象を Redmine 2.2.3 と書いているけどおそらく 2.3 が正しい
    • 更新に失敗した 2013/2/20 時点では 2.2.4 と 2.3 が公開されており最新を取得した覚えがある
    • 記事を書くにあたり、2.3 と 2.2.3 を混同した可能性がある
    • この記事のパーマネント URL にもバージョン表記がありタイトルや内容を修正すると URL との相違で混乱しそうなのでそのままにしておく
    • この記事で問題となったエラーの原因も判明したので改めてそれに触れた記事を書く予定

これまでバージョン更新は前に書いたさくらのVPS を改めて使いはじめる 9 - Ruby、Redmine、Subversion の手順で問題なかったのだけど今回は bundle install の箇所でエラーが起きた。まだ解決できてない。記録のためエラー内容を書いておく。

$ bundle install --without development test postgresql sqlite
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Enter your password to install the bundled RubyGems to your system:
Using rake (10.0.3)
Using i18n (0.6.1)
Using multi_json (1.7.1)
Using activesupport (3.2.13)
Using builder (3.0.0)
Using activemodel (3.2.13)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.6)
Using sprockets (2.2.2)
Using actionpack (3.2.13)
Using mime-types (1.21)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.5.3)
Using actionmailer (3.2.13)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.13)
Using activeresource (3.2.13)
Using bundler (1.1.3)
Using coderay (1.0.9)
Using rack-ssl (1.3.3)
Using json (1.7.7)
Using rdoc (3.12.2)
Using thor (0.17.0)
Using railties (3.2.13)
Using jquery-rails (2.0.3)
Using mysql (2.8.1)
Using mysql2 (0.3.11)
Using net-ldap (0.3.1)
Installing pg (0.14.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/local/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.

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

Gem files will remain installed in /home/XXXX/.bundler/tmp/11335/gems/pg-0.14.1 for inspection.
Results logged to /home/XXXX/.bundler/tmp/11335/gems/pg-0.14.1/ext/gem_make.out
An error occured while installing pg (0.14.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.14.1'` succeeds before bundling.

pg というのは PostgreSQL のことらしい。bundle install のオプションで postgresql を除外しているのになぜエラーとなるのか?Rails のインストールまで到達していないため、これを解決しないと rake generate_secret_token なども失敗する。つまり 2.2.3 へ更新できない。

今日は時間切れな感じなので週末にでも再試行する。

Copyright © 2009 - 2023 akabeko.me All Rights Reserved.