RedmineにPeopleというプラグインを導入してみました。なんか楽しそうだったので。
導入の流れとハマりポイントを紹介します。
どんなプラグイン?
こんなかんじで個人ページを充実させてくれます。トップのメニューにもPeopleというのが表示されて、参加しているユーザの一覧が表示されます。
インストール方法
もう基本的な感じです。
- redmine/plugin に移動してファイルを持ってきて解凍する
- bundle installをして必要な物を追加する
- マイグレーションする
rake redmine:plugins:migrate RAILS_ENV=production
- Apacheを再起動する
これだけです。ただし、、、
bundle install時のハマリ
pgってのがありませんですよ!というerrorが出ます。
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
で、このpgってのを調べていくとPostgreqlがないといれられません的な感じでした。そこで、面倒くさいと思いながらPostgresqlを導入しました(参考)。
どうやら、pg_configというのが必要で、これはPostgreqlと一緒にインストールされるわけではないということなのでインストールしました。
yum install postgresql-devel
which pg_config
でpg_configの場所を調べて、pgをインストールします。
sudo gem install pg -- --with-pg-config=/usr/bin/pg_config
一応、再度、bundle installをすると、vpimてのも追加されました。
これで準備ができました。あとは、最初に書いた基本的なインストール方法でインストールすると完了です。
このプラグインはチーム開発する際にはちょっと楽しい要素を追加できそうですね。