<p>How do I get the directory where the rakefile.rb is located?</p>

<p>I want to use this as my root directory to locate everything off.</p>

If this is a RoR app your Rakefile.rb should be in your RAILS_ROOT directory.  So in any script you can specify file location like
```
```
config.load_paths += %W( #{RAILS_ROOT}/extras )
```
```