Archive for January, 2009

Bundling Gems With Merb

As part of the deployment of my first Merb app I wanted to make sure it contained everything it would need. This is pretty easy in Merb:

thor merb:gem:install

Once that runs through and bundles all the gems in your dependencies.rb file I knew that I should have been able to simply run:

./bin/merb

and use the bundled install of Merb. But this was failing mightily with dramatic FATAL errors. Using:

./bin/merb --verbose

shed light onto the issue. It turns out that because I was doing all my development by just running merb Merb was loading necessary dependencies that I hadn’t specified explicitly in my dependencies.rb file. Dependencies like “rmagick” and “mongrel”.

Putting all the dependencies into the file and re-running thor merb:gem:install did the trick.

Incidentally, if you attempt to do something like:

thor merb:gem:install mongrel

without having mongrel specified in dependencies.rb the install will fail. This, in hindsight, makes perfect sense to me – I like that file being the authority – however the error message generated is a bit obtuse ( in this case: "Configuration could not be confirmed: Could not find RubyGem mongrel (>= 0)").

It also appears (though I’m surprised by this so I suspect my understanding of this process is suspect) that you’ll need to declare dependencies that dependent gems rely on. Again in my case to get gruff bundled I also had to define rmagick:

dependency "rmagick", "2.9.0"
dependency "gruff", "0.3.4"

So if you’re bundling gems make sure they’re all explicitly defined and use –verbose when running Merb to double-check. And read Getting Started with Merb – Bundling Merb with your Application. It was immensely helpful.

1 Comment »

chris on January 26th 2009 in /dev/ruby

Build a Business on Twitter? Really?

In an otherwise excellent rebuttal to a rather ill-thought-out complaint about Twitter rate-limiting their API, Marco misses what I think is the main reason for not building a business completely reliant on Twitter: Twitter has no business model; Twitter is burning through cash; Twitter could quite literally cease to exist by this time next year.

The original complaintant states:

I’m arguing that 20,000, or any request-rate limit for that matter, limits any app out there from being able to develop on the Twitter platform, and I don’t see why any able-minded entrepreneur would want to build on it if there’s such a rate limit in place.

I’m all for digging at the edges to find hitherto undiscovered business opportunities but frankly if your business model involves 100% reliance on a flaky, profitless company to provide you your platform and the life-blood of your enterprise then Twitter isn’t the one screwing your business, you are. Repeat after me: “Twitter owes me nothing. Twitter owes me nothing.”

In the end, Marco nails it:

Even if they call their services “application platforms” and you call your business “new media” or a “mashup”. Building a business exclusively on top of another service is irresponsible and naïve.

To better understand the ramifications of this sort of odd behaviour I highly recommend reading Fuck The Cloud by Jason Scott.

Comments Off

chris on January 23rd 2009 in /dev/random

Git Ready

If you’re using git for source control, I highly recommend adding git ready to your RSS feeds. It’s rapidly becoming one of the most useful blogs I read.

Comments Off

chris on January 17th 2009 in /dev/random

ZumoDrive: I Want It, But Just for Me

ZumoDrive sounds interesting, per this article:

For $60 a month, you can store 200gb on ZumoDrive. You can stick your whole iTunes album into it, for example, and access it from whatever machine or device you’re using.

Neat. It makes it appear as though their “cloud” (which is to say: somewhere not where your computer is, ie: internetwork) share is a local volume. I like that idea a lot. Actually, I love that idea. It bugs me that my entire iTunes library has to be carted around on my laptop everywhere I go just because I want to listen to it.

You see, I have a terabyte of networked drive space at home available to every machine on my home network. I’d much rather have my iTunes library stored on that and accessed via my laptop when I’m home via the local network (this is trivial). But here’s the kicker: I also want to be able to access that library remotely as well, which sounds a lot like what ZumoDrive proposes except I no longer control my data in this scenario, they do. (And no offense ZumoDrive, as good as you look internet start-ups have a whacky tendency to just disappear.)

So is there a way for me do to that? Something I can install on my Mac that says “treat this data from this IP address as a local volume”? I’d pay for that.

2 Comments »

chris on January 17th 2009 in /dev/random

Hire Reg Braithwaite

I expect that one of the upsides of this current economic downturn is that for one reason or another some – perhaps many – good, creative, intelligent people will find themselves looking for work. It behooves good, creative, intelligent companies to grab such people up as quick as they can before things rebound and there’s jobs-aplenty.

One person currently available is Reg Braithwaite whose skills as a software developer/management skills and experience I will not do justice to through my description here. You should just check out his resume and then his github page and then go read his other, now-defunct blog and then google him. You’ll be impressed, I promise.

Good people help retain good people. Good people with notoriety attract good people. I have a very small “brand,” but for all that it is very specific and should not be carelessly wasted. I’m looking for the type of company where we can put “The Braithwaite Effect” to work attracting and retaining the very best people.

- One reason to hire me that isn’t obvious from reading my resume

That I could, I would.

Comments Off

chris on January 14th 2009 in /dev/random

Method_missing requires responds_to?

I believe this should be taken as dogma and followed religiously:

I reject the argument because I reject as buggy any code such that object o responds to method m but o.responds_to?(:m) => false. If you implement your own method_missing for a class, you should almost always implement your own responds_to? as well.

- Maybe

There is wisdom in them there words. Monkey-patching is (perhaps) ok, but voodoo should probably be avoided at all costs and an object that can act but won’t provide a means of letting you know without actually trying it is just plain ol’ voodoo. And programming voodoo is bad juju.

4 Comments »

chris on January 13th 2009 in /dev/ruby

TextMate and “env: ruby: No such file or directory”

Recently TextMate started throwing an “env: ruby: No such file or directory” error every time I tried to use auto-completion to close tags. Turns out this is because I updated my ruby install, installed the new version to another location and renamed the old version to keep it around (“ruby186″ if you must).

However TextMate was still looking for the old version in the old location. A quick symlink and problem solved.

2 Comments »

chris on January 7th 2009 in /dev/random