Jamie van Dyke

Thoughts. Tutorials. Snippets. Stuff. Read on.

Come hither, wench!

‘tis morning, ‘ere in Yorkshire, wench,
I say, there’s dew upon thee grass.
I best get out to yonder field,
or I’ll never earn me brass.

I’ve milk’thee cows, and sheared thee sheep,
as well as spread the muck.
so I think it’s time to bob t’pub,
to get this thirst unstuck.

Now I’m drunk, I say my wench,
I’ve had a dozen kegs,
so now it’s time for you to work,
lie down and spread thee legs!

Ghost and local hostnames

I was just reading running rails local development with nginx, postgres, and passenger with homebrew on Sam Soffes site, and found it very useful for a quick copy and paste of his configs.

One thing that I found strange though is that he is using /etc/hosts to make local hostnames for web development. If you haven’t found out about the ghost gem yet:

➜  /  gem install ghost --no-ri --no-rdoc 
Successfully installed ghost-0.2.4
1 gem installed
➜  /  ghost add blah.local
  [Adding] blah.local -> 127.0.0.1
➜  /  ghost list
Listing 1 host(s):
                 blah.local -> 127.0.0.1

No need to piss about with your /etc/hosts file anymore, this is as simple as it gets.

uninitialized constant Rails::Railtie

If you’re like me and you skip reading a gem’s README when you install the latest, you’ll be seriously sorry when you don’t for inherited_resources because it is Rails 3 only. The same can be said for responders. You’ll get a big fat punch in the face with this error:

uninitialized constant Rails::Railtie

But fear not, just reverting to the following version will get you back on track:

"inherited_resources", :version => "1.0.0"
"responders", :version => "0.4.0"

Now, on your bike. Get back to work!

[Flash 9 is required to listen to audio.]

Everybody loves Parfait.

This was outside the conference (Euruko 2008) in Prague, just before the half marathon started.