Embedded Ruby
Doesn't SHTML seem like a little too much work when you want to do something very simple? The logic of it is simple enough, yet every little piece of code has to be relegated to a separate script file.
But help has arrived. It's now possible to embed Ruby code in ordinary HTML pages, using Shugo Maeda's eruby package. It's freely available; check the Ruby Application Archive at http://www.ruby-lang.org/en/raa.html for a current download location, and follow the installation directions that come with it.
Once eruby is installed as a program, your Web server needs to know about it. For Apache, that means copying the eruby executable file into the cgi-bin directory (for security reasons, a mere symbolic link won't be good enough), ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access