This is old content! The catacombs are a snapshot of content created from 2005-2007. For new stuff, visit Maniacal Rage.

maniacal rage

Garrett Murray lives here. He's the senior developer at Blue Flavor by day and an amateur writer and comedian by night. You can read more about him or
Garrett Murray's hCard
photo

Thanks to everyone who signed up to test my weblog application. I released the first beta today—hopefully this beta process will be swift and I'll release to the public in a week or so.

This is the first project I've done using Rails for mass release, and I have to say that the process was fast, fun and a great learning experience. I've only recently begun using functional and unit testing in Rails—something I should have been doing from the beginning but wasn't—and I love it. Never has it been so easy to test and debug an application. Rails constantly surprises me.

The only low point in the development and testing process was getting the app to deploy at Dreamhost, whose Rails implementation is just downright difficult and maddening at times. It's frustrating that DH can't seem to get it going correctly (a while back they upgraded to Rails 1.1 and broke everyone's sites because of errors in the upgrade process, and had to roll back to 1.0 because of it). Luckily, with plenty of help from the Rails IRC channel and about three hours of searching Google, I manage to concoct a work-around for all of the silly FCGI issues DH has and was able to install the app on Dreamhost trouble-free. Hopefully my testers will have the same experience.

As I've said before: If you want good Rails hosting, go with Segpub. They are the official hosting provider selection for my weblog application, and I don't get any compensation for saying that. I know I sound like a broken record, but I can't say it enough.

I'm going to switch this site over to the new app in a day or two, once I find the time.


Okay, so let's say I'd spent a little bit of time writing a simple and efficient weblog application using Rails, and I wanted to release said application, but I wanted to run a quick private beta test first to make sure it works for everyone. What would I do?

Perhaps I would ask anyone interested in testing this Rails weblog application to send an email to garrett at maniacalrage dot net, with the subject "I want to test your app," and then I would send this app to those people and they would play with it for a few days and report everything was fine and then I would release the app under the GPL and such.

Right. And in case anyone was curious, I would tell them that the app is basically a better version of the app I built to run this site, made easier to configure and install and use.

Update: Wow, okay, we've got enough. Thanks!


Here's how I create a new Rails app and start version control using SVN. I keep my repositories in a directory called source and I develop in a directory called rails (under the default sites folder), both in my home directory. For the purposes of this tutorial, I will be creating a new Rails project for development of this site.

This all assumes you've got Ruby, LightTPD (not required), SVN and Ruby on Rails installed. Need to install Ruby/Rails? Check out Dan Benjamin's tutorial over at Hivelogic. It's excellent. Need to install SVN? Check out Dan Benjamin's other tutorial over at Hivelogic, or you can use one of Martin Ott's pre-built packages. This also assumes you're using OS X. Most of this would apply to other platforms, but you'll have to tweak it on your own.

Of course, please be careful, et cetera, no guarantees, you know the drill with all of this. I'm just posting it here so other people can benefit from it, but I can't promise it will work for you (as always, be careful).

  1. Create an SVN repository.

    svnadmin create ~/source/maniacalrage.net
    
  2. Create a basic directory structure for the repository. I use the recommended three top level directores: branches, tags and trunk. I work out of trunk and create branches when I have stable builds. Create this structure in a temporary directory (created below) and then import it into the new repository.

    mkdir ~/temp
    mkdir ~/temp/branches
    mkdir ~/temp/tags
    mkdir ~/temp/trunk
    
  3. Do the initial import of this structure. Note that the location of the repository must be explicitly stated—you can't use ~/. Of course, all ~/ means is /users/your_user_name. Once you're done, you can trash that temporary directory you created (be careful with that rm command!).

    svn import ~/temp file:///users/garrett/source/maniacalrage.net -m "initial import"
    rm -r ~/temp
    
  4. Let's check out your local working copy. There are a couple of things to note about the checkout line—once again, you must specify the full path to your repository (and this time, include the trunk directory since that's where you'll be working from), and you need to give the checkout command the name of the folder you want your working copy to exist in. The most logical choice here is maniacalrage.net.

    cd ~/sites/rails
    svn checkout file:///users/garrett/source/maniacalrage.net/trunk maniacalrage.net
    
  5. Okay, it's time to create your Rails app. You're going to create it inside the directory you just created when checking out. Rails will simply add files to the existing directory.

    rails maniacalrage.net
    
  6. Now that we've got our Rails app in place, we need to add everything it just created to SVN. We're going to force SVN to accept all the files and directories.

    cd maniacalrage.net
    svn add . --force
    
  7. Check those files in.

    svn ci -m "initial rails import"
    svn up
    
  8. We don't want our log files versioned, so let's remove them from SVN and tell SVN to ignore them in the future. You could also ignore the database.yml file, but I never do since I always mimic my development environment's settings when I work from various machines (i.e. I use the same MySQL login and password from machine to machine).

    svn remove log/*
    svn propset svn:ignore "*.*" log/
    svn ci -m "removing log files and ignoring them in the future"
    svn up
    
  9. (If you're going to use Webrick as your local testing server, skip these last two steps—they only apply to LightTPD.) Run your Rails app for the first time and then shut it down (using control-c on the keyboard). This will create the config/lighttpd.conf file.

    ./script/server
    
  10. Add the new conf file to your repository.

    svn add config/lighttpd.conf
    svn ci -m "added lighttpd conf file"
    svn up
    

And you're done. This may seem like a lot of work, but it's actually rather trivial once you've done it once or twice. From this point on, you can begin developing your Rails app and you're all set up for version control. Where do you go from here? A few places:

  • The SVN Guided Tour.
  • SvnX is an open GUI client for Subversion and OS X. Will make several things easier on you in the long run, especially diff viewing with its bundled FileMerge integration. It's also free.

In addition to the following tutorial, you might benefit from the following points of advice:

  1. Open config/lighttpd.conf and change server.port from 3000 to 80. This will allow you to access your site from localhost rather than localhost:3000. This requires you run your local testing server a bit differently, however. First, you need to disable the built-in Apache instance running on OS X, since it runs on port 80.

    /System/Library/StartupItems/Apache/Apache stop
    

    And then you need to launch your server as such and enter your password when prompted:

    sudo ./script/server
    
  2. Add a virtual host to your hosts file to simplify development. For instance, since I'll be developing this site, I'd rather access dev.maniacalrage.net on my local box than localhost. Assuming you have TextMate installed (of course you do!) and the shell command enabled (No? Just visit "Terminal Usage..." in the Help menu in TextMate), open your hosts file for editing:

    mate /etc/hosts
    

    And then add a line after the first localhost line:

    127.0.0.1  dev.maniacalrage.net
    

    Save, enter your password when prompted, and close. Now you can view your new URL when developing and you'll get your Rails app.

Now get to work building your new Rails application, send me lots of gold, and subscribe to the podcast!


This site is hosted by Segment Publishing and has been for just over two years. Segpub is a fantastic hosting company with unparalleled support and, quite frankly, the fastest Ruby on Rails hosting on the planet. If you're on Dreamhost or TextDrive right now, you have no idea how fast Rails can be when hosted properly—I urge you to look into Segpub if you're looking to host Rails sites, especially larger, mission-critical applications. I get no compensation for anything I'm saying here, or for referrals. I'm just being honest.

I've spent the last five weeks developing a rather large events management site using Rails, and we launched a week ago with Segpub and the results have been nothing less than perfect. Insanely fast application speeds and great support to work out the kinks (all of which I created).

The more I work with Rails, the more I fall in love with it. The past five weeks have been a ton of work, but it's actually been, well, fun, which is not something most people can say about building a large web app. As the popularity of Rails increases, Segpub is going to prove invaluable to people who need their app to work quickly and pain-free. I'm telling you—start now.

And speaking of that five weeks: A majority of my non-work time was been spent sitting around and sleeping, trying to build energy, so everything else suffered. The podcast took an unexpected hiatus, but is coming back this week, and I haven't uploaded any of the photos I've taken over the past several weeks. I'm mostly playing catch-up at this point, but I'm getting there.


A week or two back, when that whole Four Things meme was going around, Matt Linderman at 37signals posted an entry on their weblog, Signal vs. Noise, in which he "passed" on answering any of the questions (but wrote them all out) and then said he hoped the meme would end. Immediately afterward, Matt posted another entry entitled "A meme worth spreading: If you could give the commencement address at a graduation ceremony, what would you say?"

There's something really offensive to me about this. I can't quite place it, but most of it has to do with the pomposity of 37signals over the last few months. I understand not wanting to participate in the meme, but posting an entry about not participating is just stupid. And then, to think that your meme is "worth spreading" and to actually write that in the title, well, I just can't let that go. Apparently, I'm not the only one.

Here's my problem: I like 37signals. Or, at least, I like a few of their products and I like their simplistic design style, and I love Ruby on Rails. So I'm attached to them in that way. When they talk (especially about RoR), I feel somewhat connected, a tiny, tiny bit responsible for what they say. There have been a few times in the past when David Heinemeier Hansson (creator of RoR, hereby referred to as DHH) has said some extremely boastful things that made me cringe (see an example at the RoR weblog, ironically titled "Don't be so arrogant") and 37signals as a whole has been getting more and more arrogant as time goes on.

I understand that success makes you feel powerful. And 37signals has been very successful in the past few years. But it's starting to affect the way they behave. Nearly every post on the SVN weblog is about "getting real" or "smaller is better" or some sort of "listen, we are awesome, listen to us, Ta-Da!, because we're smaller, smarter and better looking than you and, Writeboard, we've built some crazy stuff that will make you shit your pants and you'll ask us how and we're going to tell you now, but not, you know, Campfire, just straight out, but with some attitude like you should be happy we're telling you and you should feel stupid for not knowing this already, Basecamp, even though we're just making it up now, but it doesn't matter, think about how great it is so eat it." That's a hyperbole, but not a large one. They're laying it on too thick.

Kevin Leitch created a mock-up for a new product that I think is spot-on: Selfimportance, by 37signals. They've linked to it over at SVN, but I hope they're listening. Because it's a problem. A serious one. And I don't think 37signals gets it, because Matt, the guy who posted the first two offensive entries, replied in the comments of one and wrote:

But I also understand there's a bigger thing going on here too. The overall tone of 37s and our content seems to rub people the wrong way. Some people think we're pompous, arrogant, know-it-alls. We know that. We made a decision a while back to go ahead and be provocative even if it angers or upsets some. We think it's better to present ideas in bold strokes then to be wishy-washy about it. If that comes off as cocky or arrogant, so be it. We'd rather be provocative than water everything down with "it depends..." or some other qualifier. We think our readers are smart enough to figure out what's going on.

Being a jerk isn't being provocative, it's just being a jerk, and this reply proves the point more than anything else. Hopefully, Matt is speaking more for himself than he claims.


One of the reasons I wasn't posting a lot of entries on the site before this new RoR version was that the CMS I built wasn't working. Adding a new post required using phpMyAdmin and manually creating tag associations as well as creating a Markdown version of the content as well. It was a pain. I used to have a fully-functional CMS, but it broke when we moved to PHP5 at Segpub and I never bothered to fix it. So for the last year or so, I've been entering posts via the database itself, basically. And it was cumbersome.

Another issue was always having to think of titles. I hate thinking of titles. I don't want to do it anymore. The new site doesn't have them (technically, it does, you just never see them because they're for my reference only—this entry is called "Pooping Out Bananas") and I love it. No pressure. This goes hand-in-hand with the whole one-entry-on-the-index thing I started with the last design, which nearly immediately killed the site. Having only one entry on your index page at any given time is ballsy—it requires that you actually have good content that can last for several days, something that's, well, nearly impossible in this medium. I would find myself looking at an post 20 minutes after I published it and already being pissed off at the stale feeling it gave me. It's one thing for a long piece of fiction, but when it's just some nonsense about nonsense then, well, it's annoying.

And then there's the lack of comments. I must say, I fucking love it. I don't have to worry about saying something so fantastic that you'll feel obligated to respond, and I don't have to worry when you don't. Clearly, you're here—I still get plenty of hits a day—and if you want to say something you can send me an email (there's a link in the info section) and I'll respond.

This new format feels freeing and suddenly I'm writing without worry or responsibility. Stripping away everything but the most basic of content has given me an internet boner for this site which, effectively, is the same thing as a real-world boner except that it's really shiny and keeps beeping. See, no responsibility at all.


This is a new version of Maniacal Rage, built in Ruby on Rails. The old stuff is gone (well, technically, it's still available in the graveyard—look there if you want to). Things are about 95% simpler. There is no archives page. There are no monthly archives. You can find things by tag or by permalink, or by searching. Find all those options in the small information area on each page (you can get to it quickly by clicking the site's title up there).

You'll need to update your feed subscriptions, sorry. See below for new addresses (or use the auto-detected link in your browser [most have this now]).

There are no comments yet. They might come back, I don't know. For now, let's do it old school and you use the email link on the page to send me any feedback you have. I'll respond, probably.

Yeah.