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

Goodbye Instiki, Hello JunebugWiki

Posted by Tue, 06 Feb 2007 15: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. :-/

Remember When?

Posted by Fri, 02 Feb 2007 05: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 18: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.

Let's not forget the little people

Posted by Wed, 24 Jan 2007 19:27:00 GMT

Yesterday, I announced the new Ruby on Rails Deployment group, which has attracted over 200 people and boasts over 50 messages in just the first 24 hours of it’s life.

While this is a greater turnout than I expected… I made a huge mistake yesterday. I forgot to invite the man behind the cutrain.


14:25 < zedas> robbyonrails: rubyonrails-deployment and i wasn't invited?
14:26 < zedas> i think i need to revoke some licenses. :-)
...
14:26 < jarkko> sounds robby just lost his mudcrap belt

I forgot to invite… Zed Shaw.

Zed,

I know that I’ve only met you briefly, but I feel like I’ve known you for years. With each and every mongrel I install, configure, and start… you’re always… right there… with me. This love goes deep.

Please forgive me for not inviting you to the show. I’ve asked the person sitting in the first row to move back a few rows to an empty seat… so you can sit here… right here… with me.

Please accept this letter and invite as an apology.

Robby

For everyone else, we have a few seats available near the back of the room, which you can reserve here. ...but before you do, be sure to recommend his work. [1]

1 king of the world

Announcement: New Ruby on Rails Deployment Group

Posted by Tue, 23 Jan 2007 19:52:00 GMT

Our team is working on a new hosting solution1 for Rails applications. Throughout this process, we’ve been reviewing all the various methods that our team and customers have been using to deploy and host applications written with Ruby on Rails. Our team has been able to closely watch the technologies change on our servers for almost two full years to accommodate the latest in deployment solutions.

Recently, a few deployment savvy customers of ours and us decided that it was time to take some of our experiences and conversations out into the public. We’d like to invite all of you that are interested in Rails deployment to join the new Deploying Rails google group. Whether you’re trying to setup a staging server, deploy to a shared solution like we offer at PLANET ARGON, managing your own VPS, or configuring a cluster of servers for your big launch, we’d love to talk with you about this stuff.

I’m secretly hoping that all the talented Rails deployment experts, like our friends at Rails Machine and Engine Yard, will join us in our effort. :-)

If you’re still hosting your Rails application on Apache and FCGI in a shared environment, this list is for you! ;-)

Join the group today!

UPDATE Zed Shaw has entered the building…

1 Stay tuned in early February… ;-)

Rails applciation caching with memcache

Posted by Sat, 14 Oct 2006 22:24:00 GMT

Courtenay has posted a step by step tutorial on using memcache within your Rails application. He not only discusses caching… but also how to “precache the data so that each page load is blazing fast without sacrificing user experience.

Read more about it on the caboo.se blog.


< court3nay> robbyonrails: hey, i wrote that line just for you
< court3nay> robbyonrails: the one you quoted. i was actually thinking, "hmm, i bet robby will like this quote" 

I’m touched… and it’s great to hear that people are thinking more about these problems. :-)

Older posts: 1 2 3 4 5