I’ve got a website w/ lunarpages, and I’ve been using erb to do some
things w/ my pages. Everything has worked well so far.
My problem is, my main pages each call in header and footer templates,
but I can’t figure out how to get the server to evaluate the templates
if they are .rhtml files w/ embedded ruby code.
<% require ‘erb’
def import_erb path
or ERB.new(File.read(path), nil, nil, ‘x’).result()
<%= import_erb(‘footer.rhtml’) %>
But I get a ‘500 internal server error’. If I leave out the .result
call, there’s no problem. I wonder if it’s lunarpages or my fault.