Integrating OpenID with Authlogic

I won’t take any credit here. If you want to do this, jump right over to the Ryan Bates Railscast Number 170. He totally nails it – just follow along and adjust for the views you are actually using, and it’s operational in a jiffy. Sweet! The only thing that didn’t work for me was the install for the open_id_authentication plugin. I had to copy and install the files manually. I note that the install worked when I tried it again while writing this article, so maybe it was a temporary github problem. It’s a funny thing about OpenID, though. When I ask my technically competent acquaintances about it, the… Read More

Continue Reading

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

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