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


Kattare is Trustwave Certified and Safe Harbor Certified | Rated Safe For Kids by ICRA | All Rights Reserved Worldwide
Copyright © 1997 - 2012 Kättare Internet Services | Processed in 0.012 seconds by pyramid-05 in Corvallis, Oregon