我已经有几天试图在我的CentOS WHM / CPanel服务器上安装Redmine了,我已经能够达到这样的程度,即它在CPanel中运行但是当我试图访问应用程序时它永远不会加载,我在mongrel.log中获得第一个以下段,在production.log中获得第二个段。有什么想法吗?
Ruby 1.8.7(2011-02-18 patchlevel 334)[x86_64-linux]
Rails 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补丁但仍然没有运气。
以下是我系统上安装的宝石列表。
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]
我确定这只是我在某种程度上忽视的东西,请帮忙。谢谢!
詹姆斯
答案 0 :(得分: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)
答案 1 :(得分:0)
在此网站中,您可以找到一个解决方案,
http://borrowbits.com/2012/05/how-to-install-redmine-1-3-on-centos-server-with-whmcpanel/
我希望你能正确安装Redmine
此致
森特
答案 2 :(得分:0)
您的config / initializers / 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)
如果是这样,您可以在支持的rails版本上添加2.3.15,如下所示:
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)