apache上でredMineを動かす。

前回(http://d.hatena.ne.jp/ghostbass/20070426/1177571335)の続き
こちら(http://motomay.blog96.fc2.com/blog-entry-17.html)でも苦労されているようで。

今回変更したもの
(redmine root)/public/dispatch.cgiを以下のように変更

#!c:/ruby/ruby186-25/bin/ruby

require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)

# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
require "dispatcher"

ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
Dispatcher.dispatch

うちはwindowsなので元からrubyのパスが違ってる。前回のhelloworldと比較して発覚。

(redmine root)/config/environment.rbの環境設定部分を追加

ENV['RAILS_ENV'] ||= 'production'

そういえばどのレビューも'production'以外で動作させてなかった。

とりあえずこれだけのはず。