redmineのバージョンアップ

Post date: 2014/06/27 2:10:44

1。rubyを1.8.7から、1.9.3にあげる

PATHを変更する(/usr/bin/rubyより、1.9.3のrubyが先に来るようにする)

最新版のpassengerをgem installする

注意: yum installしたpassengerは古い(ruby 1.8.7に対応)

passenger-install-apache2-modlue (-aをつければ自動実行)を実行し、指示の通りに /etc/httpd/conf.d/passenger.confを変更する

変更後の例

LoadModule passenger_module /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/passenger-4.0.42/buildout/apache2/mod_passenger.so

<IfModule mod_passenger.c>

PassengerRoot /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/passenger-4.0.42

PassengerDefaultRuby /opt/chef/embedded/bin/ruby

</IfModule>

注意: 64bit 版CentOSの場合、上記で問題ないが、32bit版の場合、export PKG_CONFIG_PATH=/usr/lib/pkgconfigを実行しないと、以下のエラーとなった。

Package apr-1 was not found in the pkg-config search path.

Perhaps you should add the directory containing `apr-1.pc'

to the PKG_CONFIG_PATH environment variable

No package 'apr-1' found

2。redmineを最新版にする

bundle installすると、libxml2に関係したエラーが出るので、とりあえず以下を実行

bundle config build.nokogiri --use-system-libraries

bundle install

注意:インストール後 export RUBY_ENV=productionして、rake db:migrateを忘れないこと

3。起動

/etc/sysconfig/i18nで、システムのロケールを ja_JP.UTF8にする。そうしないと、serviceでapacheを

起動した場合に、incompatible character encodings: ASCII-8BIT and UTF-8が出る。

これで、incompatible character encodings: ASCII-8BIT and UTF-8が出なくなった。また、gmail経由でメールを送れるようになった。

以上