Recent Posts

Remember When?

February 02, 2007

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?

Business of Rails Panel at RailsConf 2007

February 02, 2007

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… ;-)

Goodbye Pound, Hello Nginx

February 01, 2007

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 customers[^1^](#fn1){#fnref1 .footnote-ref role=”doc-noteref”} 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.

Rails 1.2 On CRN.com

January 28, 2007

I was recently asked a few questions by Stacy Cowley, a writer for CRN about the Rails 1.2 release and how our Design and Development team at PLANET ARGON is adopting it. This Q&A session resulted in a brief article titled, Ruby on Rails Gets RESTFul in Major Update, which appeared on the CRN site last Friday afternoon.

Thanks to the Rails Core team and all of those in the community who continue to help make Ruby on Rails an awesome addition in my tool belt.

Announcement: New Ruby on Rails Deployment Group

January 23, 2007

Our team is working on a new hosting solution[^1^](#fn1){#fnref1 .footnote-ref role=”doc-noteref”} 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. ::: {#fn1}
Stay tuned in early February... ;-)[↩︎](#fnref1){.footnote-back
role="doc-backlink"}
:::

Every Second Counts with a Piston in your Trunk

January 16, 2007

Recently, I wrote about using RSpec and autotest (…which I think should be called autospec) together to help boost productivity while working on Rails projects. It seems that a few members of the PLANET ARGON team have picked up on using it, which I’m happy to hear about. :-)

It’s not the only thing that I’m happy about though.

I recently came across another gem. Several of my comrades in #caboose are using piston to manage external plugins for Ruby on Rails. Wait! Isn’t this what Subversion externals is meant for? Well, yes… but externals also eat away at productivity. For example, each day, we may have anywhere from 4-6 designers and developers working on one client project. When we’re in crunch mode, this could account for quite a few subversion commits throughout the day. We all know that we should run svn up on a regular basis to make sure that we’re keeping things in sync… especially when designers and developers are working really closely and fine tuning something specific in the application. Well, the one downside to this process is that each svn up not only checks our repository, but it also checks external repositories.

“But wait! Can’t you just ignore externals on an update?”

Of course, but who wants to type out —ignore-externals each time they run an update? …or perhaps you could make an alias for this in your shell. In any event, everyone on the team is then left to be responsible for doing this… and an extra 30-60 seconds (if not longer) per svn update times x number of people on project… well… time wasted if you’re closely watching the svn updates. Also, TextMate doesn’t have an option currently (that I could find) to ignore externals, so for those who manage subversion through it… they’re waiting on externals within their primary workspace.

Another issue with svn externals is that when a repository goes down, it really starts to slow stuff down your updates. This is always fun when you go to deploy your application with Capistrano and realize that you can’t finish the update because it can’t connect it to http://svn.lazyatom.com/public/plugins/acts_as_hasselhoff/ to make sure that your application has the latest version of the best plugins available for Rails.

acts_as_hasselhoff{width=”240” height=”160”}

Then there is the whole issue of wanting to make changes to the plugin that you’re including as an external. How does that fit into the whole mix?

There is Hope!

Piston encourages you to keep your external plugins in your local repository. Don’t worry, it remembers where it retrieved the code from so that you can update from the external repository at any time.

Installing Piston

Again, this is really simple like most gems.

The Zen of Auto Rspec

January 10, 2007

Several months ago, I heard that people were using a program called autotest to have their tests continue to run as you made changes to your code base, which comes with ZenTest. It’s a really nice tool written by Ryan Davis and I hadn’t gotten a chance to play with it as of yet. Well, our team isn’t spending too much time in the test/ directory these days as we jumped ship near the end of last summer and found ourselves hanging out on the Isle of BDD. The locals are quite thoughtful about these sorts of things.

I just started working on a project that has been under development for several months and as I’m getting to learn the ins/outs of the system, I find myself having to rerun the specs, which can take quite a bit of time watching. Watching your specs or tests run sometimes is as productive as watching your code compile. Oddly enough, this is as close to compilation as we really get when working with Ruby on Rails… and it’s a productivity killer for me.

There Must Be a Better Way!

So, I did a quick google search and found an announcement for Rails that ran specs through ZenTest. This was exactly what I was searching for!

Some requirements

Please makes sure that you have the following gems installed in your development environment as they are dependencies to make this all work.

  • zentest
  • diff-lcs
<!-- -->

$ sudo gem install zentest diff-lcs

note I’m going to assume that you have rspec and rspec for rails installed… if not… tsk. ;-)

Install RSpec autotest

```ruby
$ script/plugin install http://svn.caldersphere.net/svn/main/plugins/rspec_autotest
If you're using subversion, you might consider installing it as an
external.
```bash
```ruby
$ script/plugin install -x http://svn.caldersphere.net/svn/main/plugins/rspec_autotest
### Running RSpec autotest

This is where it gets tricky. ;-)
```bash
```ruby
$ rake spec:autotest

```

Now, you can keep a terminal window open and autotest will watch your application and detect when files change. When they change, it’ll attempt to rerun your specs (specifically those that changed). This helps save you the time of having to rerun all your specs throughout the development process and keep your spec:all sanity checks for when you’re about to commit code to your repository.

I’ll post another entry in the next few days to show you how you can use Growl with RSpec Autotest to keep you from having to look at your terminal all the time.

Until then… have fun!

Meet the Cheat

January 10, 2007

Hey! You’re a cheater!

Well, if you’re not… I’m hoping to make one out of you.

“A thing worth having is a thing worth cheating for.” — W. C. Fields

I’m a fan of the PDF cheat sheets as I like the consolidated content contained in them. However, I don’t like having to read PDFs any more than I have to. Printing them isn’t always ideal either as I really don’t like to carry around extra paper in my laptop bag. So, what are we to do?

Well, you can cheat the system! …and I’m going to show you how!

Cheat is this really nice command-line tool that outputs a plain text cheat sheet whenever and wherever you want.

Install the Cheat

Like all the happy and good Rubygems, this is quite simple…

Apple listens to Robby and releases an iPhone

January 09, 2007

Well, they must be listening to me.

A few months ago, I posted that I was looking to switch mobile services. Well, I switched over to Cingular after a lot of back and forth and have been fairly happy with their service. I opted to get their lowend/entry phone as I wanted to get a nicer phone when I found something that met my requirements.

I wanted…

  • wifi
  • bluetooth
  • ssh client
  • lightweight web browsing
  • scheduling that sync’d well with ical

Well, I hadn’t found anything that really caught my attention. So, I heard rumors about Apple releasing a phone in January. So… I waited.

“Yay Apple! I think I’m in the right office, we’re all sitting here reading the keynote updates.” — Audrey

So, how much is this going to cost us? ..a few of us here came up with our predictions.

Thank you, Apple!

…well… I would have given Apple a hug if I didn’t have to wait til June.

…back to work.

Working in Portland Coffee Shops and Cafes Reviews, part 2

January 06, 2007

During the summer of 2005, I wrote a post that listed several coffee shops in Portland, Oregon that I found to be really good places to work on your laptop at. I’ve gotten bored with my regulars and have recently begun to look for new places to venture to.

Pier
Coffee{width=”240” height=”160”}

Pier Coffee is in a weird part of Portland that is somewhat isolated due to the train tracks that will block you in when a long train is moving through town. It’s a very short walk from Allison’s place and they have Oregon Chai, which has become my replacement for drinking coffee. The chairs in Pier Coffee are very comfortable and they have an electrical outlet at most of their tables. When you get bored, you can walk over and play darts, or get a glass of wine. The wireless works really well and when it’s not raining, you can sit out front and overlook the train tracks and downtown, while hacking on your laptop. Pier Coffee is what I would consider an easy place for me to feel productive. There usually isn’t too many people here and I believe most of the customers are from the two condo complexes next to it. The staff is very friendly and their music tastes aren’t annoying.

Backspace is about a half block from the PLANET ARGON office. They don’t serve Oregon Chai, so I usually only get a tea, a viso, or a hot cocoa while there. They have a few tables and couches and I haven’t found this a good place to be productive. It’s a good place to have a short meeting with a coworker though. Music tastes are better here than most places, and they have a food menu now that caters to my vegetarian diet. There are a few electrical outlets, but the seats near them are often occupied.

Three Lions Bakery is about a block from the PLANET ARGON office. They do have Oregon Chai, so I stop by here often in the morning to get my fix. Not many electrical outlets, so your visits are usually not very long. They have a few sandwiches that are quite good. This is a good place to stop by if you’re in the mood to work for about a hour and have some chai and an excellent (and freshly baked) cookie.

If you’re in Portland and have some recommendations, please do share. I’m looking for a few places that are open later in the evening.