Forum: Ruby How do I use Erubis?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jonathan D. (Guest)
on 2009-01-27 00:26
I have been using eruby for embedded ruby in html, and I am moving to a
new server and am interested in using erubis instead - how do I do that?
Do I just install the rubygem and my .rhtml files should work the same
way as with eruby?
Brian C. (Guest)
on 2009-01-27 10:38
Jonathan D. wrote:
> I have been using eruby for embedded ruby in html, and I am moving to a
> new server and am interested in using erubis instead - how do I do that?

To paraphrase: you are asking "how to I get my webserver to use erubis
instead of erb"?

This question can't be answered without knowing what webserver you're
using.

If you show how you've got your current webserver set up to use eruby,
then it may be clear how to change it to use erubis.

If you're using Apache with mod_ruby, the erubis documentation explains
how to do it here:
http://www.kuwata-lab.com/erubis/users-guide.06.ht...

> Do I just install the rubygem and my .rhtml files should work the same
> way as with eruby?

Well, why not just try it. If it fails then you can show a specific
problem:

"I have been using eruby successfully with config X. I changed this to
config Y to try to use erubis, but then I got error message Z" - showing
all of X, Y and Z.

Having narrowed down your problem like this, and provided all the
context, it makes it much easier for someone to help you.
This topic is locked and can not be replied to.