1

几天来,我一直在尝试在我的 CentOS WHM/CPanel 服务器上安装 Redmine,并且我已经能够让它达到一个点,即它在 CPanel 中运行,但是当我尝试访问应用程序时它永远不会加载我在 mongrel.log 中得到了下面的第一个片段,在 production.log 中得到了第二个片段。有任何想法吗?

Ruby 1.8.7 (2011-02-18 补丁级别 334) [x86_64-linux]

导轨 2.3.14

<mongrel.log>
Mon May 07 20:26:30 -0400 2012: Error calling Dispatcher.dispatch #<NoMethodError: private method `split' called for nil:NilClass>
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/cgi_process.rb:52:in `dispatch_cgi'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:101:in `dispatch_cgi'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_controller/dispatcher.rb:27:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:159:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:158:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/usr/bin/mongrel_rails:23:in `load'
/usr/bin/mongrel_rails:23

<production.log>
Processing WelcomeController#index (for 24.52.2XX.XX at 2012-05-07 20:26:30) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Redirected to http://projects.mydomain.com/login?back_url=http%3A%2F%2Fprojects.mydomain.com%2F
Filter chain halted as [:check_if_login_required] rendered_or_redirected.
Completed in 38ms (DB: 35) | 302 Found [http://projects.mydomain.com/]

我已经尝试修复在初始化文件夹(http://www.redmine.org/issues/7688)中添加 mongrel.rb 补丁,但仍然没有运气。

这是安装在我的系统上的 gem 列表。

actionmailer (2.3.14)
actionpack (2.3.14)
activerecord (2.3.14)
activeresource (2.3.14)
activesupport (2.3.14)
bundler (1.1.3)
cgi_multipart_eof_fix (2.5.0)
coderay (0.9.8)
daemon_controller (1.0.0)
daemons (1.1.8)
edavis10-object_daddy (0.4.3)
fastercsv (1.5.4)
fastthread (1.0.7)
gem_plugin (0.2.3)
hoe (3.0.4)
i18n (0.4.2)
json (1.7.1)
metaclass (0.0.1)
mocha (0.11.4)
mongrel (1.1.5)
mysql (2.8.1)
net-ldap (0.3.1)
passenger (3.0.12)
rack (1.1.1)
rails (2.3.14)
rake (0.8.3)
RedCloth (4.2.9)
ruby-openid (2.1.8)
rubygems-update (1.8.24)
rubytree (0.5.2)
sqlite3 (1.3.6)
tzinfo (0.3.33)

项目子域 .htaccess 文件如下。

RewriteEngine on
RewriteCond %{HTTP_HOST} ^projects\.mydomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.projects\.mydomain\.com$
RewriteRule ^.*$ "http\:\/\/127\.0\.0\.1\:12001%{REQUEST_URI}" [P,QSA,L]

我确定这只是我以某种方式忽略的东西,请帮忙。谢谢!

詹姆士

4

3 回答 3

1

在上面提到的mongrel补丁中,系统满足了运行脚本所需的所有条件,但最终在注释掉mongrel.rb的第一行和最后一行后,脚本能够运行并且站点开始工作。

奇怪,不知道是什么导致它不通过验证规则。这些规则是有充分理由的。如果有人有任何想法,请告诉我!

#if ['2.3.8', '2.3.9', '2.3.10', '2.3.11', '2.3.14'].include?(Rails.version) && Gem.available?('mongrel', '~>1.1.5') && self.class.const_defined?(:Mongrel)
....
#end

运行的规格是

Ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
Rails 2.3.14
Gem: mongrel (1.1.5)
于 2012-05-08T21:44:01.320 回答
0

在这个网站上,您有一个解决问题的方法,

http://borrowbits.com/2012/05/how-to-install-redmine-1-3-on-centos-server-with-whmcpanel/

希望你能正确安装Redmine

问候,

维森特

于 2012-05-18T08:21:07.023 回答
0

Your config/initializers/mongrel.rb might read

if ['2.3.8', '2.3.9', '2.3.10', '2.3.11','2.3.14'].include?(Rails.version) && Gem.available?('mongrel', '~>1.1.5') && self.class.const_defined?(:Mongrel)

If is that so, you can add 2.3.15 on the supported rails versions, like this:

if ['2.3.8', '2.3.9', '2.3.10', '2.3.11','2.3.14','2.3.15'].include?(Rails.version) && Gem.available?('mongrel', '~>1.1.5') && self.class.const_defined?(:Mongrel)

于 2013-01-14T11:14:02.893 回答