A couple of weeks ago my ISP apparently added Apache support for Ruby scripts, which they didn't provide until recently. Which is great news, but had an unfortunate side-effect: All download links to Ruby scripts on this domain broke, as Apache tried to execute them instead of presenting them in text/plain, but failed because none of the files had the executable bit set (and aren't meant to be executed anyway). A classic moment of naive assumptions on my side -- I should have anticipated that Ruby support is becoming a popular request for hosting providers these days.
Due to me having moved to London and starting a new job I was too busy to take care of that; there was a weekend a while ago when I tried to sweet-talk .htaccess to not treat .rb files as CGI scripts, but failed.
I don't remember exactly what I tried to do, but here's the commented-out remainder in my .htaccess file:
# don't execute ruby scripts #AddHandler default-handler .rb #RemoveHandler .rb #AddType text/plain .rb
...so I was probably trying combinations of these three lines, but still got 403s. (Does someone know how to do this correctly? I.e., how to instruct Apache to serve .rb files as plaintext?)
And the polite emails about broken script downloads kept coming (which says something about the nuisance level this created -- I disabled comments for now, and it takes manual effort and more clicks to contact me than to write a comment), so today I decided to do something about it.
As I failed to configure Apache I did it the old-fashioned way: renamed all .rb files to .rb.txt, then updated the links -- not very elegant. Please let me know if I missed some scripts.
I really should set up a public SVN repository -- I have one on TextDrive that I rarely use, but I'm a little hesitant about the administration effort involved in creating a public repository next to the secure non-public repository... any tips?
Comments
Comments are closed. You can contact me instead.