From: Paul Date: 2005-05-29T15:00:20+09:00 Subject: How to get erb to process .rhtml or .rtml files Hi all, found ruby 1.6 buried on my new web host's server & can get mysql4.1 access fine (now that is). I can get erb on this server to work via a bit of trickery. The question I have is, how do I set up .htacces or whatever the file is called to get apache to run this for me... ruby16 erb.rb thefile.rtml when a user clicks on the link with 'thefile.rtml' in it. ....so I can do all that embedded ruby stuff in thefile.rtml & present the user with whateever I want. The test files, test.rb, 0.rb and 1.rb that come with erb 1.4.3 work for me. The server doesn't or won't support mod_ruby or fastcgi. I know there is an AddHandler statement but don't know how to use it for this. AddHandler rubypage .rhtml AddHandler rubypage .rtml Action rubypage /rubyrun.cgi? The prior statements tell apache to run rubyrun.cgi for files ending in ..rhtml or .rtml. rubyrun.cgi (not tested) takes the file and pareses it trough erb and displays the results in the browser. rubyrun.cgi #!usr/local/bin/ruby16 -Icgi-bin/ruby/lib/ruby/1.6 require 'erb/erb' fh = File.new( ARGV[0] ) eruby_script = fh.read erb = ERb.new(eruby_script) print erb.result( binding ) ^z Whats the best way? Any advide or thoughts. Thank you Paul.