It appears that one problem I have with this is there is NO eruby around to install, and even the erubis example I am trying to use, uses eruby. Is this whole realm of work just diseased? It's a nightmare. On 12/29/2011 02:16 PM, Xeno Campanoli wro > Sorry. Perhaps I just need to be more specific. The section of the > doc I am trying is: > > > 6-11 Helper Class for mod_ruby > > Thanks Andrew R Jackson, he developed 'erubis-run.rb' which enables > you to use Erubis with mod_ruby. > > 1. Copy 'erubis-2.7.0/contrib/erubis-run.rb' to the 'RUBYLIBDIR/apache' > directory (for example '/usr/local/lib/ruby/1.8/apache') which > contains 'ruby-run.rb', 'eruby-run.rb', and so on. > > $ cd erubis-2.7.0/ > $ sudo copy contrib/erubis-run.rb /usr/local/lib/ruby/1.8/apache/ > > 2. Add the following example to your 'httpd.conf' (for example > '/usr/local/apache2/conf/httpd.conf') > > LoadModule ruby_module modules/mod_ruby.so > <IfModule mod_ruby.c> > RubyRequire apache/ruby-run > RubyRequire apache/eruby-run > RubyRequire apache/erubis-run > <Location /erubis> > SetHandler ruby-object > RubyHandler Apache::ErubisRun.instance > </Location> > <Files *.rhtml> > SetHandler ruby-object > RubyHandler Apache::ErubisRun.instance > </Files> > </IfModule> > > 3. Restart Apache web server. > > $ sudo /usr/local/apache2/bin/apachectl stop > $ sudo /usr/local/apache2/bin/apachectl start > > 4. Create *.rhtml file, for example: > > <html> > <body> > Now is<%= Time.now %> > Erubis version is<%= Erubis::VERSION %> > </body> > </html> > > 5. Change mode of your directory to be writable by web server process. > > $ cd /usr/local/apache2/htdocs/erubis > $ sudo chgrp daemon . > $ sudo chmod 775 . > > 6. Access the *.rhtml file and you'll get the web page. > > You must set your directories to be writable by web server process, > because Apache::ErubisRun calls Erubis::Eruby.load_file() internally > which creates cache files in the same directory in which '*.rhtml' > file exists. > > > > > > > On 12/29/2011 02:10 PM, Xeno Campanoli wrote: >> I am using the example here: >> >> http://www.kuwata-lab.com/erubis/users-guide.06.html >> >> and I am almost working, with a failure as follows from the apache >> error log: >> >> [Thu Dec 29 14:07:36 2011] [error] (8)Exec format error: exec of >> '/home/xeno/public_html/ex.rhtml' failed >> [Thu Dec 29 14:07:36 2011] [error] [client 10.151.8.152] Premature >> end of script headers: ex.rhtml >> --snip-- >> >> The file is taken verbatum from the post. In fact for good measure, >> I did it again, just to make sure I wasn't forgetting something. >> Please someone suggest something here. >> >> > >