简体   繁体   English

Redmine-调用Dispatcher.dispatch#时出错<NoMethodError: private method `split' called for nil:NilClass>

[英]Redmine - Error calling Dispatcher.dispatch #<NoMethodError: private method `split' called for nil:NilClass>

I have for a few days now been attempting to install Redmine on my CentOS WHM/CPanel server and I have been able to get it to a point where is says it is running in CPanel but when I try to get to the application it never loads and I get the first below segment in my mongrel.log and the second segment in the production.log. 我几天来一直在尝试在我的CentOS WHM / CPanel服务器上安装Redmine,我已经能够将其安装到可以在CPanel中运行的程度,但是当我尝试进入该应用程序时,它永远不会加载我在mongrel.log中获得了下面的第一部分,在production.log中获得了第二部分。 Any ideas? 有任何想法吗?

Ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux] Ruby 1.8.7(2011-02-18补丁程序334)[x86_64-linux]

Rails 2.3.14 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/]

I have tried fixes adding the mongrel.rb patch in the initializers folder (http://www.redmine.org/issues/7688) and still no luck. 我尝试了一些修复程序,将mongrel.rb补丁添加到了初始化文件夹(http://www.redmine.org/issues/7688)中,但还是没有运气。

Here is the list of gems installed on my system. 这是我的系统上安装的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)

The projects subdomain .htaccess file is as follows. 项目子域.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]

I'm sure it's just something I am somehow overlooking, please help. 我确定这只是我不知所措的东西,请帮忙。 Thanks! 谢谢!

James 詹姆士

In the mongrel patch mentioned above, the system met all the conditions required to run the script, but in the end, after commenting out the first and last lines of mongrel.rb, the script was able to run and the site started working. 在上面提到的mongrel补丁中,系统满足了运行脚本所需的所有条件,但是最后,在注释掉mongrel.rb的第一行和最后一行之后,脚本得以运行并且站点开始工作。

Strange, not sure what could cause it to not to pass the validation rules. 奇怪,不确定是什么原因导致它不通过验证规则。 Those rules are there for good reason. 这些规则在那里是有充分理由的。 If anyone has any ideas, please let me know! 如果有人有任何想法,请告诉我!

#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

The specs of what was running was 正在运行的规格是

Ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
Rails 2.3.14
Gem: mongrel (1.1.5)

In this web you have one solution for your question, 在这个网上,您有一个解决问题的方法,

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

I hope that you can install correctly Redmine 我希望您可以正确安装Redmine

Regards, 问候,

Vicente 维森特

Your config/initializers/mongrel.rb might read 您的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)

If is that so, you can add 2.3.15 on the supported rails versions, like this: 如果是这样,则可以在受支持的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)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 NoMethodError:私有方法`warn&#39;调用nil:NilClass - NoMethodError: private method `warn' called for nil:NilClass 调用Dispatcher.dispatch时出错# - Error calling Dispatcher.dispatch #<NameError: uninitialized constant ActionController::CgiRequest 错误(为nil:NilClass调用了私有方法“ select”): - Error (private method `select' called for nil:NilClass): Spork错误:nil:NilClass的未定义方法&#39;split&#39;(NoMethodError) - Spork error: undefined method 'split' for nil:NilClass (NoMethodError) 为nil:NilClass获取错误未定义方法`[]&#39;(NoMethodError) - Getting error undefined method `[]' for nil:NilClass (NoMethodError) Ruby未定义方法`[]&#39;表示nil:NilClass(NoMethodError)错误 - Ruby undefined method `[]' for nil:NilClass (NoMethodError) error NoMethodError:未定义的方法“+”用于 nil:NilClass 用于私有方法中的变量 - NoMethodError: undefined method `+' for nil:NilClass for variable in private method minitest gem出错:NoMethodError:NoMethodError:nil的未定义方法`env&#39;:NilClass * - Error on minitest gem: NoMethodError: NoMethodError: undefined method `env' for nil:NilClass* NoMethodError:使用 Capistrano 部署时为 nil:NilClass 未定义的方法“拆分” - NoMethodError: undefined method `split' for nil:NilClass when deploying with Capistrano NoMethodError:nil:NilClass的未定义方法“ []” - NoMethodError: undefined method `[]' for nil:NilClass
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM