Apache2/mod_ruby (CentOS/Fedora): mod_ruby: ruby:0:in `require': no such file to load -- apache/ruby-run (LoadError)

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Thu, 2011-08-04 12:38. :: Errors

Error: Apache2/mod_ruby (CentOS/Fedora): mod_ruby: ruby:0:in `require': no such file to load -- apache/ruby-run (LoadError)

You get the following error messages in Apache's error log:

[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

 

Solution

Open /etc/httpd/conf.d/ruby.conf...

vi /etc/httpd/conf.d/ruby.conf

... and add the line RubyAddPath /1.8:

LoadModule ruby_module modules/mod_ruby.so
RubyAddPath /1.8

Restart Apache2:

/etc/init.d/httpd restart


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.