使用带有 FastCGI 的 Apache 访问我的 Redmine 安装时出现此类错误。这可能是什么原因?
/usr/local/rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1/gems/fcgi-0.8.8/lib/fcgi.rb:454:in `read_length': undefined method `>>' for "\x0F":String (NoMethodError)
from /usr/local/rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1/gems/fcgi-0.8.8/lib/fcgi.rb:448:in `read_pair'
from /usr/local/rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1/gems/fcgi-0.8.8/lib/fcgi.rb:441:in `parse_values'
from /usr/local/rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1/gems/fcgi-0.8.8/lib/fcgi.rb:435:in `parse'
from /usr/local/rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1/gems/fcgi-0.8.8/lib/fcgi.rb:195:in `read_record'
from /usr/local/rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1/gems/fcgi-0.8.8/lib/fcgi.rb:126:in `next_request'
from /usr/local/rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1/gems/fcgi-0.8.8/lib/fcgi.rb:116:in `session'
from /usr/local/rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1/gems/fcgi-0.8.8/lib/fcgi.rb:104:in `each_request'
from /usr/local/rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1/gems/fcgi-0.8.8/lib/fcgi.rb:36:in `each'
from /usr/local/rvm/rubies/ruby-1.9.3-p374/lib/ruby/gems/1.9.1/gems/rack-1.4.4/lib/rack/handler/fastcgi.rb:27:in `run'
from /var/www/redmine/public/dispatch.fcgi:21:in `<main>'
错误中提到的行如下所示(带有行号),它是 fcgi.rg 文件的片段:
453 def self::read_length(buf)
454 if buf[0] >> 7 == 0
455 then buf.slice!(0,1)[0]
456 else buf.slice!(0,4).unpack('N')[0] & ((1<<31) - 1)
457 end
458 end
谢谢,马克