HAML and Apache Encodings

I’m playing around a bit with the HAML gem. It broke my Apache / Passenger server immediately. The original error message looked something like: /!\ FAILSAFE /!\ 2009-05-01 10:05:18 -1000 Status: 500 Internal Server Error invalid byte sequence in US-ASCII Google to the rescue. On Linux machines, you should have a /etc/sysconfig/httpd file. I added HTTPD_LANG=en_US.UTF-8 and all was well after restarting Apache. This took awhile to find, so here’s the URL to the Rack Development Google Group, of all places. There is some info on OSX as well. http://tinyurl.com/m8oxnz Google has added at least 10 points to my IQ. Make that 20 points.

Continue Reading

WordPress Under Rails

There have been occasional discussions about integrating a WordPress CMS into a Rails application. One approach is to simply do a WordPress install under RAILS_ROOT/public/blog. That’s pretty straightforward: cd RAILS_ROOT/public mkdir blog cd blog svn co http://core.svn.wordpress.org/tags/2.8.4 . Then do the usual WordPress setup ritual. If you’re running Phusion Passenger, you need to tell Passenger to ignore the WordPress stuff: I did this setup last night, and now my Rails app has a built-in, full-featured blog. The down side to this approach is that you now have yukky PHP code “polluting” your Rails directory structure, and it also implies that you have a lot of control over your Apache server.… Read More

Continue Reading

A Word About WordPress

Last week there was a fair amount of buzz about WordPress security issues. Here’s an Information Week article and also a short blurb from IT World in case you’re not a WordPress user. And, here’s a rant about lazy admins from a long-time user of WordPress. Two things jump out at me here: 1) WordPress is being described as a “self-hosted” application, and 2) upgrading WordPress is surprisingly clumsy, given the assumption in 1). That’s not entirely fair – there is an “automatic” upgade path, but it presupposes that you have the necessary access permissions to whatever server is running WordPress, which may not be true if you are running… Read More

Continue Reading

Apache Through the Firewall

Back in the old days (pre-2000), the various flavors of UNIX had very little security other than the “baked-in” stuff such as encrypted passwords, root vs normal users, the standard file permissions, etc. Later, things like SELinux and firewalls were added. I still get tripped up on that occasionally. I recently moved my Rails apps from the mongrel-based server model to Phusion Passenger (documented in a previous post). This worked fine, but it was time to let all the machines on my home network see the web sites, if only to see what they look like on Windows PCs. A Google search shows that a lot of people have trouble… Read More

Continue Reading

TweetDeck on Linux and KDE

Summarizing all I learned in one place…. I use the KDE window manager on Linux mainly because it’s been the de facto standard for the semiconductor industry since the Dark Ages, and I don’t want to burn the time switching to GNOME right now. TweetDeck seems to be GNOME-centric, BTW. On Fedora Core 8, 32-bit Linux, with KDE: You need these RPMs installed on your machine: adobeair1.0-1.5.1-8210, adobe-certs-1.0-8210, flash-plugin-10.0.22.87-release. You can get the AIR package at http://get.adobe.com/air/ and the Flash 10 RPM at http://get.adobe.com/flashplayer/. The adobe certs RPM should be available through the Yum channel, if it’s not already installed on your system. Download and install the TweetDeck AIR file:… Read More

Continue Reading