In order to automatically parse Ruby-embedded which are using Eruby as PHP does, you can setup an Apache web server.
Follow the steps given below so that you can use Eruby with Apache web server :
1. First, in the cgi-bin directory, copy Eruby binary and add the lines given below to httpd.conf:
AddType application/x-httpd-eruby .rhtml
Action application/x-httpd-eruby /cgi-bin/eruby
Note : If you would like to include index.rhtml, you can replace or add DirectoryIndex directive. If you do this, you will be able to create directory listings for directories that do not contain index.html by using Ruby.
2. Now, if you have done the above correctly and if you enter the following directive, even if index.html and index.shtml do not exist in the directory, the embedded Ruby script index.rhtml would be searched.
DirectoryIndex index.html index.shtml index.rhtml
Important : You can also use a site wide Ruby script.
DirectoryIndex index.html index.shtml /cgi-bin/index.rb
Congratulations!! you are done
After the above steps are followed properly, you will be able to generate forms and dynamic content as you can write HTML documents which contain Embedded Ruby.