简体   繁体   中英

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. Any ideas?

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

I have tried fixes adding the mongrel.rb patch in the initializers folder (http://www.redmine.org/issues/7688) and still no luck.

Here is the list of gems installed on my system.

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.

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.

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/

I hope that you can install correctly Redmine

Regards,

Vicente

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM