错误:Apache2 / mod_ruby(CentOS / Fedora):mod_ruby:ruby:0:在`require'中:不需要加载这样的文件 - apache / ruby-run(LoadError)
您在Apache的错误日志中收到以下错误消息:
[Thu May 26 02:05:05 2011] [error] mod_ruby: ruby:0:in `require': no such file to load -- apache/ruby-run (LoadError)
[Thu May 26 02:05:05 2011] [error] mod_ruby: failed to require apache/ruby-run
[Thu May 26 02:05:05 2011] [error] mod_ruby: error in ruby
解
打开/etc/httpd/conf.d/ruby.conf
...
vi /etc/httpd/conf.d/ruby.conf
...并添加行RubyAddPath /1.8
:
LoadModule ruby_module modules/mod_ruby.so RubyAddPath /1.8
重新启动Apache2:
/etc/init.d/httpd restart