From: Du De Date: 2008-07-16T07:35:21+09:00 Subject: erb and rhtml templates? 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. I've tried: ---------------- <% require 'erb' def import_erb path ERB.new(File.read(path)).result() # or ERB.new(File.read(path), nil, nil, '_x_').result() end %> # and then <%= 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. -- Posted via http://www.ruby-forum.com/.