Ruby Rake: Rake aborted! Error

Came across a strange error today while using Rake... I kept getting a Rake aborted! error whenever rake tried to create a distribution directory using the 'directory' command.

Additionally, rake was reporting: stopping only thread ... note: use sleep to stop forever.
(I am putting this here in case anyone is googling it, like I did).

It turns out that I was trying to have the rake file create a directory named 'dist' and the name was what was causing the problem. I think that there is a conflict with the directory name and a built-in task or something similar.

The work around?
Use "./dist" instead of "dist".

Here is an excerpt of my rakefile (original):

...
BUILDDIR = "build"
DISTDIR = "dist"

directory BUILDDIR
directory DISTDIR

task :init => [BUILDDIR, DISTDIR] do
end
...

Running rake with the following command line will cause the crash:
rake init

My code after changes:

...
BUILDDIR = "build"
DISTDIR = "./dist"

directory BUILDDIR
directory DISTDIR

task :init => [BUILDDIR, DISTDIR] do
end
...

Hopefully this helps someone else out.