19.7. Ruby and the Web Server
One of the most common servers in use today is Apache. If you use Apache, you need to know about the mod_ruby module, presented in section 19.7.1, “Using mod_ruby.”
Another useful concept on the server side is embedded Ruby; two tools for this job are erb (covered here) and eruby. This enables you to embed Ruby code into text (typically HTML or XML) so that it can have data inserted dynamically. This is covered in section 19.7.2, “Using erb.”
Some developers in the Ruby community have implemented web servers in Ruby. Of course, you might be wondering why anyone would be concerned with writing a new web server when plenty of good ones—such as Apache—already exist.
There are several situations in which you might actually ...
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