Compass, SASS, HAML

I’m working on a project that is using the latest Rails markup buzz, namely Compass, SASS and HAML, so it’s time to begin the learning process. Part of that effort will be to convert my personal Rails project over to Compass et. al. I found that the best approach seems to be to install all the required gems manually before doing anything else. That is: Installing HAML also installs SASS, which is pretty convenient. Then install the basic compass gem. Compass supports a few standard stylesheet frameworks: 960gs, blueprint and YUI. I’m using 960. For Rails integration, you can either build a new Rails project, or you can choose to… Read More

Continue Reading

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

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