Justin Collins
10/17/2006 11:05:00 PM
Marc Heiler wrote:
> Hello,
>
> How can i embed ruby code into a html page,
> like php code, without using erb, nor
> its IMO slightly ugly syntax? (I am
> using Apache2.)
>
> - Yes, I want to do this.
>
> Basically what I'd like to do is replace
> my old php scripts, which are in part
> embedded, in part just simple html
> generators. I figured that the
> stuff that has to be rewritten in ruby
> would be a lot easier to maintain and
> extend, than continuing with
> php (on webstuff). But I like to keep
> the "embedded" logic simple as it
> currently is. Ruby simply is
> a much better language than php.
>
>
> No, I dont need rails - i need a hammer
> for my nail, not a hovering tank to shoot
> down the whole building (read as:
> complexity). :-)
>
Why not use erb (or eruby)? The syntax is pretty much the same as PHP,
except with "<%" instead of "<?"
If you are really against it, though, you can google around for some
other web templating tools. I know several exist, but I've always been
fine with eruby.
-Justin