Read my latest article: 8 things I look for in a Ruby on Rails app (posted Thu, 06 Jul 2017 17:59:00 GMT)

Is BDD kinkier than TDD?

Posted by Thu, 08 Feb 2007 19:20:00 GMT

If you’re in need of a compelling reason to switch from Test-Driven Development to Behavior-Driven Development... consider this.

“BDD sounds kinkier.” -Michael K. Loukides, Book Editor for O’Reilly

...on that bombshell... I am going to suggest that this be used as the official BDD logo.

There you have it. Deep down… the biggest reason that I switched from Test::Unit to RSpec... was the sex appeal. ;-)

What was your reason?

Don't Go Hungry During RailsConf 2007

Posted by Wed, 07 Feb 2007 06:13:00 GMT

If you’re going to be coming to Portland, Oregon for RailsConf 2007, be sure to check out the new Urban Edibles website. Michael Bunsen gave a short demonstration of it at the Portland Ruby Brigade monthly meeting. If you’re looking for fig and pear trees within the city limits of Portland, this is the site for you!

Goodbye Instiki, Hello JunebugWiki

Posted by Tue, 06 Feb 2007 16:46:00 GMT

If you’ve spent much time on the Ruby on Rails wiki, you know that the spam situation smells like rotten fruit.

We’ve been using Instiki, the same software as the Rails wiki for the PLANET ARGON Documentation Project and the spam situation was becoming an annoyance. So, we’ve switched to JunebugWiki as step one, to see how it holds up. The default styling was a nice improvement because we haven’t had much chance to update the instiki one. It might not solve all of our spam problems, but in the short term, it appears to be a more elegant solution. It’s also the first application built with camping that I have personally deployed.

So… I present to you… the new PLANET ARGON Documentation Project.

In other news, it appears that RubyURL has caught the eye of spammers, which sucks. I’m still thinking over a few possible ways to try and prevent that. :-/

Business of Rails Panel at RailsConf 2007

Posted by Fri, 02 Feb 2007 20:57:00 GMT

Trying to finish my book and running PLANET ARGON consumes quite a bit of my time… so when the RailsConf people announced that they were accepting proposals for talks, I opted to pass so that it wouldn’t distract from my sprint to finish my book. :-)

This decision was even easier for me when Nathaniel Talbot invited me to be part of his proposal for a panel of people that are running companies that specialize with Ruby on Rails. I liked the idea and the other people that were invited were all people that I greatly admired and respected… so I said yes. After all, so much of my time and energy goes into this stuff and there isn’t any doubt that I spend way more time on the business side of Rails… than in code these days.

I just got an email from Nathaniel to let me know that his proposal was accepted.

So, if you’ll be at RailsConf 2007 (US), come see me on The Business of Rails panel session.

The following people are planned to be on the panel.

Moderator: Nathaniel Talbott, Terralien Inc.

Panelists include:

  • Justin Gehtland, Relevance, LLC
  • Geoffrey Grosenbach, Topfunky Corporation
  • Andre Lewis, earthcode.com
  • Joe O’Brien, EdgeCase, LLC
  • Robby Russell, Planet Argon, LLC

I hope that you all send Nathaniel some great (and tough) questions… ;-)

Remember When?

Posted by Fri, 02 Feb 2007 06:49:00 GMT

I was looking through some old code from over two years ago, when I was playing with my first Rails applications. I noticed this hidden file in the public/ directory, called .htaccess.

Do you remember the good ‘ole days?


RewriteRule ^(.*)$ /dispatch.cgi?$1 [QSA,L]

I remember when we at PLANET ARGON first starting hosting Ruby on Rails applications (two years ago now!) and we had to continually explain to people that running on FastCGI was going to significantly improve speed over their default CGI deployment. This was one of the first FAQs that we posted on our website.

...oh how we’ve come a long way.

Before you know it, we’ll be on IRC and talking about the good ‘ole Rails days… like we do about the BBS days. ;-)

Do you have a remember when story related to Rails?

Goodbye Pound, Hello Nginx

Posted by Thu, 01 Feb 2007 19:48:00 GMT

I’ve been using pound for several months and it’s been a good relationship. Except, for some strange reason, I noticed that I was getting development mode errors when it was running in production mode. I thought there might be an issue with my mongrel cluster… but that wasn’t the case.

Let me give you a little background to how we’re encouraging customers to handle their deployment on PLANET ARGON.

Most of our hosting customers1 have three tiers (unless you have your own static IP address), one which we manage, two that you manage.

We handle the main web server/proxy server and proxy to your desired load balancer/proxy/server, which is generally any of the following options… depending on your preference.

Each customer has a unique proxy server port and a range of other ports for their mongrel clusters.

So… the typical setup is…

Apache(external:80) [proxies to]==> Pound(localhost:8050) [proxies to]==> Mongrel::Cluster(localhost:10500-10503)

Well, when a request comes in through Apache, it gets passed off to Pound and each tier has it’s own headers. By the time that it reaches Mongrel, all the requests appear to be coming from localhost.. not the remote address of the person using your application. Notice nothing but localhost requests in your production.log? ...this is the reason.

So, what side-effects does this have? Well, aside from every request looking local… Rails will, by default, output a normal development-mode error message if the request is coming from localhost.


    # found in...
    # actionpack/lib/action_controller/rescure.rb

    # Exception handler called when the performance of an action raises an exception.
    def rescue_action(exception)
      log_error(exception) if logger
      erase_results if performed?

      if consider_all_requests_local || local_request?
        rescue_action_locally(exception)
      else
        rescue_action_in_public(exception)
      end
    end

It seems that this currently causes the exception notification plugin, which we often use, to not work. We noticed this in a staging environment for an application that we’re building for a client about a month ago. After debugging SMTP servers, mongrel configuration… I was baffled.

Nginx to the rescue

After some investigation and attempts to find a workaround in Pound, I decided to redeploy my blog with Nginx. This was a pretty painless process and I was able to use the example posted on the PLANET ARGON Documentation Project.

Nginx allows you to do the following to overwrite the headers being passed to Mongrel.


    proxy_set_header  X-Real-IP  $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;

Problem Solved!

If there is a workaround for this in Pound, I’d love to be able to relay this information to our customers that haven’t made the switch yet.

Thank you, Brian and Timothy for encouraging me to finally switch my blog to Nginx. ;-)

If you have questions related to deploying Rails applications, be sure to check out the Rails Deployment google group.

1 For more information about our hosting, visit http://planetargon.com/hosting.html.

Older posts: 1 2 3