Knowledge Base - FAQ
Question: What do I need to add to apache to get mod_ruby to work? (esp with Rails?)
You'll want to add the following to the top of the httpd.conf:
LoadModule ruby_module libexec/mod_ruby.so
And if you have an AddModules section:
AddModule mod_ruby.c
Then after the modules have been taken care of:
<IfModule mod_ruby.c>
RubySafeLevel 0 # required for Rails to work...
RubyRequire apache/ruby-run
# Execute *.rbx files as Ruby scripts
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
# Execute *.rbx files as Ruby scripts
<Files *.rb>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>
Last Modified: May 03, 2006




