Installing mod_ruby on FreeBSD 6
This technical recipe describes how to install mod_ruby under Apache 1.3 on FreeBSD 6. The recipe is not specific to any particular Ruby framework, such as Ruby on Rails, and does not assume any knowledge of Ruby.
First, install the mod_ruby package:
portmanager www/mod_ruby
Add the line:
Include /usr/local/etc/apache/httpd.conf.mod_ruby
to /usr/local/etc/apache/httpd.conf. I usually add the include directive after all of the AddModule lines. Next, uncomment lines in httpd.conf.mod_ruby pertaining to ruby and eruby. I don’t use ERbRun so I leave those lines commented.
Finally, create a file under public_html called helloworld.rhtml. The file should contain the following code:
<%= print Time.now %>
The current time and date should print when accessing the page from your web browser.
0 Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URI