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

Changing IDEs

I have been bouncing between the RadRails and NetBeans IDEs for quite some time now. I like them both a lot, but I have not been able to make RadRails Test::Unit work 100% with Ruby 1.9.x. The 1.8.x version works fine, and I know there are some changes between the two Rubys that affect testing, but I have not done a complete analysis of the changes. In any event, I have switched to NetBeans 6.5.1 simply because I can run my Rails test suites with Ruby 1.9 and everything works. Of course the real solution is to get my professional and financial houses in order, acquire a MacBook Pro 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

Fun With Regular Expressions

If I wrote code all day, every day, I’m sure I could become really good at manipulating regular expressions. The obscure syntax is sort of Zen-like with a large dose of Perl obfuscation-fu. A one-liner that does a lot of cool text parsing appeals to the Nerd part of my DNA string. In reality, I have to grab my books when it’s regex time. The classic is Jeff Friedl’s “Mastering Regular Expressions”, published by O’Reilly, but this week I ran across a copy of O’Reilly’s “Regular Expressions Cookbook” by Goyvaerts and Levithan (Amazon link for both here), It covers 8 different languages, including Ruby. Worth a look. The Cookbook also… Read More

Continue Reading