PSA: The Midnight Oil is CRACK
July 18th, 2008
Burning the midnight oil is a programmer’s CRACK!
If you’ve ever continued working on something, sort of like beating your head against the wall hoping to get rid of a headache, late into the night/early morning only to come back the next morning exhausted AND seeing your code has her panties on her half shaven head. Well, you know JUST what I’m talking about then.
PUT THE CODES AWAY, my friend. Put the codes away for another day.
load_missing_constant Expected foo.rb to define Foo
May 5th, 2008
Hello sobering Monday.
Eager to jump back into the fray of a suite of specs I left half baked Friday, I spent a little time first trying to figure out why I was getting a particular error when attempting to run the spec suite.
1 2 3 |
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:249: in `load_missing_constant': Expected /sekrat/awesomeproject/app/models/awesome.rb to define Awesome (LoadError) |
Nice, eh? I’ve seen it before but I can never remember what causes it. Actually, I there are probably a number of ways you might run into this error message, such as the load order for plugins being incorrect. The way I encountered it today was by injecting a typo into an AR method, set_inheritance_column lacking the final ‘n’ in this case. So if you are shedding some tears over this, double check the spelling on your AR methods (has_many, belongs_to, etc..)
Seo Rapper Tells it like it is
March 29th, 2008
props to lifo
Plaintext Rspec Stories in Vim
March 12th, 2008
I’ve been using rspec for a while now and as soon as the excitement surrounding the plain text stories development manifested itself into a real feature I was dying to try it out. While tinkering with it I created some scripts in vim to try and bump the experience up a notch.
I’ve put them up on github so that maybe some others will find them useful and make ‘m better. :) I name my stories with a .story extension to make them easy to identify, others seem to like making them extension-less which I guess would be ok too if they could be found in a predictable path.
Included are ftdetection, ftplugin, syntax, and an indentation scripts.
obligatory screen shots…

Backporting Imagemagick from Hardy Heron to Gutsy Gibbon
March 7th, 2008
If like me you’ve tried to update the rmagick gem on a gutsy (or older) release of ubuntu, the outdated nature of your imagemagick installation has been brought to your attention. Kind of amusing how out of date this particular package has been. shrug
Luckily the version in Hardy Heron will suffice our needs, so this is how I went about backporting it for anyone wishing to do the same.
Prepare..
1 2 3 4 |
sudo apt-get update sudo apt-get build-dep imagemagick sudo aptitude install libdjvulibre-dev libgraphviz3-dev |
Aquire..
Grab the imagemagick source package from the heron release..
- Go to the imagemagick page in launchpad, https://launchpad.net/ubuntu/hardy/i386/imagemagick
- Click the published version link on the right which at this time will take you to: https://launchpad.net/ubuntu/hardy/i386/imagemagick/7:6.3.7.9.dfsg1-2ubuntu1
- Download the tar and diff links near the top of that page.
- unpack the tar somewhere and apply the patch
1 2 3 |
tar zxvf imagemagick_6.3.7.9.dfsg1.orig.tar.gz zcat imagemagick_6.3.7.9.dfsg1-2ubuntu1.diff.gz |patch -p0 |
apt-get source imagemagick |
I suppose you could probably also update your sources to hardy, update and do the apt-get source, put your sources back to gutsy and update again.. whatever works for you, don’t go blaming me if you accidentally find yourself checking out how awesome the hardy heron release is though.
Carress..
Before we can build it for our gutsy machine, we need to fix one thing. It currently expects libgraphviz-dev, we’re going to change that to libgraphviz3-dev1 2 3 |
cd imagemagick-6.3.7.9.dfsg1 sed -i 's/libgraphviz-dev/libgraphviz3-dev/' debian/control |
Build..
1 2 |
sudo dpkg-buildpackage && cd .. && ls -l *deb |
Install..
1 2 |
sudo dpkg -i l*deb i*deb p*deb |
Enjoy..
And so it begins
February 18th, 2008
