Ruby-based websites not working -- newly migrated

3 posts / 0 new
Last post
#1 Sat, 01/24/2009 - 11:48
WolfstarHosting

Ruby-based websites not working -- newly migrated

Heya, all. Just finishing the migration to Virtualmin Pro. I'm pretty pleased so far, but I have encountered a "gotcha". None of my .rhtml sites are working. Instead, I'm getting the dreaded file-download from my browser.

Obviously Apache is not realizing it is supposed to put the index.rhtml through the /cgi-bin/ruby.cgi

I just checked and the config file for domain was missing the "AddType application/x-httpd-ruby .rhtml" to permit .rhtml. As well, you'll have to add it to the DirectoryIndex (index.rhtml) because its not there by default.

However, having fixed those issues myself, I'm now getting errors rendering the page. Essentially, the ruby.cgi is choking on the file contents. Now, this is the same file that runs just fine on the old server. I'm having some problems figuring out what the problem here is.

Does anyone have experience getting Ruby to serve up .RHTML? I've got two customers down at this point, and I'm looking at have to roll back to the original servers. I'd rather not do that.

Sat, 01/24/2009 - 11:57
Joe
Joe's picture

<div class='quote'>Instead, I'm getting the dreaded file-download from my browser.</div>

I don't think I've ever dreaded this behavior. ;-)

<div class='quote'>Obviously Apache is not realizing it is supposed to put the index.rhtml through the /cgi-bin/ruby.cgi</div>

Why would it? This is the first I've ever heard of .rhtml. I suppose it is a Ruby template language?

You haven't given us any errors to go on. You just said you're getting errors. We can't read your mind. ;-)

Check the error_log for the site in question and the system-wide suexec log, and of course include whatever error is in the browser.

And, maybe this is a dumb question, but have you checked to be sure these files run from the command line? Maybe the Ruby versions are different and you have syntax errors or similar in your code. This would lead to a 500 error, since Apache would be seeing no header in your file.

--

Check out the forum guidelines!

Sat, 01/24/2009 - 14:39 (Reply to #2)
WolfstarHosting

Thanks for your reply, Joe. Your remark about not having heard of &quot;.rhtml&quot; reminded me the piece that was not coming to mind. .rhtml files are &quot;eRuby&quot; templates. I manually plugged the eRuby config into the system, and that fixed it.

The original system I am migrating from was a bare-metal hand-rolled installation that is five years old... I forgot a couple of the details. :)

Topic locked