On Wednesday 31 May 2006 00:20, Aiko Barz wrote: > Ruby is working for me too. Check this out: > the script is great, aiko and has helped my understanding a lot (i'm trying to learn ksh as well and it was nice to see a script like this in action!)
(also thanks to marcus (and others) for the various tips. marcus, i will follow through on the scripting as per your suggestions, after i get the embedded ruby with mod_ruby to work.) i ran the script and the environment is all setup nicely. then i went to /usr/local/share/examples/mod_ruby and got the httpd.conf addititons (copied below) from there and put it into my httpd.conf file. then something happens that i don't understand. the RubyRequire apache/ruby-run causes no problems when i start apache, but when i try RubyRequire apache/eruby-run (which i need, i presume, to run the embedded .rhtml files) i get error messages spewed out: [Wed May 31 14:13:04 2006] [error] mod_ruby: failed to require apache/eruby-run [Wed May 31 14:13:04 2006] [notice] Accept mutex: sysvsem (Default: sysvsem) [Wed May 31 14:13:04 2006] [error] mod_ruby: failed to require apache/eruby-run [Wed May 31 14:13:04 2006] [error] mod_ruby: error in ruby [Wed May 31 14:13:04 2006] [error] mod_ruby: error in ruby [Wed May 31 14:13:04 2006] [error] mod_ruby: /usr/local/lib/ruby/1.8/apache/eruby-run.rb:45:in `require': no such file to load -- eruby (LoadError) i find this weird because eruby is sitting right beside ruby in the apache folder!!??? yet it seems that it can't be found. finally, don't i also need a AddType application/x-httpd-ruby .rhtml -- In friendship, prad ... with you on your journey Towards Freedom http://www.towardsfreedom.com (website) Information, Inspiration, Imagination - truly a site for soaring I's # You should specify the correct path to mod_ruby.so. LoadModule ruby_module /usr/local/apache/libexec/mod_ruby.so #####note: this needs to be /usr/lib/apache/modules/mod_ruby.so##### # # If ClearModuleList is used in your httpd.conf, you should use AddModule # # to activate the ruby module. # AddModule mod_ruby.c # If the ruby module is installed, this will be enabled. <IfModule mod_ruby.c> # for Apache::RubyRun RubyRequire apache/ruby-run # exec files under /ruby as ruby scripts. <Location /ruby> SetHandler ruby-object RubyHandler Apache::RubyRun.instance Options +ExecCGI </Location> # exec *.rbx as ruby scripts. <Files *.rbx> SetHandler ruby-object RubyHandler Apache::RubyRun.instance </Files> # # for Apache::ERubyRun # RubyRequire apache/eruby-run # # # handle files under /eruby as eRuby files by eruby. # <Location /eruby> # SetHandler ruby-object # RubyHandler Apache::ERubyRun.instance # </Location> # # # handle *.rhtml as eruby files. # <Files *.rhtml> # SetHandler ruby-object # RubyHandler Apache::ERubyRun.instance # </Files> # # for Apache::ERbRun # RubyRequire apache/erb-run # # # handle files under /erb as eRuby files by ERb. # <Location /erb> # SetHandler ruby-object # RubyHandler Apache::ERbRun.instance # </Location> # # for debug # RubyRequire auto-reload </IfModule>