and I am almost working, with a failure as follows from the apache error
[Thu Dec 29 14:07:36 2011] [error] (8)Exec format error: exec of
[Thu Dec 29 14:07:36 2011] [error] [client 10.151.8.152] Premature end
of script headers: ex.rhtml
The file is taken verbatum from the post. In fact for good measure, I
did it again, just to make sure I wasn’t forgetting something. Please
someone suggest something here.
Access the *.rhtml file and you’ll get the web page.
You must set your directories to be writable by web server process,
because Apache::ErubisRun calls Erubis::Eruby.load_file() internally
which creates cache files in the same directory in which ‘*.rhtml’ file
It appears that one problem I have with this is there is NO eruby around
to install, and even the erubis example I am trying to use, uses eruby.
Is this whole realm of work just diseased? It’s a nightmare.
Looks like I may need to merely find the old eruby gem…??
The trouble is, almost nobody runs Ruby this way any more, and so you’re
likely to find yourself without support even if you manage to make it
work. mod_ruby is crusty, and especially having multiple ruby apps all
sharing the same ruby interpreter instance is a recipe for security
nightmares and applications stomping on each other.
These days, I suggest you would be best running one of the following:
Phusion Passenger, a.k.a. mod_rails
A reverse proxy (e.g. Apache mod_proxy or Nginx) talking to a ruby
backend webserver (e.g. mongrel, unicorn, rainbows etc)
fastcgi, if neither of the above can work in your situation
In each case, the idea is that each ruby app is a self-contained HTTP
server, with extra instances being forked as required to handle larger
load. Phusion and mod_fcgi can do this dynamically for you.
You need some sort of framework for your app, unless you want to write
native Rack apps. I would suggest Sinatra as a very simple approach
which supports ERB templates nicely.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.