# Noob question -- where are rake files/tasks/scripts located

**URL:** <https://www.ruby-forum.com/t/noob-question-where-are-rake-files-tasks-scripts-located/144783>\
**Category:** Rails\
**Created:** [August 1, 2008, 11:46pm UTC](https://www.ruby-forum.com/t/noob-question-where-are-rake-files-tasks-scripts-located/144783 "2008-08-01T23:46:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morgan\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/96bed5/32.png) [@Morgan\_P](https://www.ruby-forum.com/u/Morgan_P)\
**Post date:** [August 1, 2008, 11:46pm UTC](https://www.ruby-forum.com/t/noob-question-where-are-rake-files-tasks-scripts-located/144783/1 "2008-08-01T23:46:01Z")

</div>

Hi there,

Just getting my feet wet with rails (and ruby) and want to poke around  
a little. Could anyone tell me where to find the file executed by  
rake, for example, with the command rake db:migrate.

thanks!

-Morgan

---

<div class="post-metadata">

**Author:** ![Morgan\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/96bed5/32.png) [@Morgan\_P](https://www.ruby-forum.com/u/Morgan_P)\
**Post date:** [August 2, 2008, 12:17am UTC](https://www.ruby-forum.com/t/noob-question-where-are-rake-files-tasks-scripts-located/144783/2 "2008-08-02T00:17:00Z")

</div>

> Just getting my feet wet with rails (and ruby) and want to poke around  
> a little. Could anyone tell me where to find the file executed by  
> rake, for example, with the command rake db:migrate.

If you’ve vendor’d rails (and you should) you’ll find them here:

RAILS\_ROOT/vendor/rails/railties/lib/tasks

You’re own custom ones go into:

RAILS\_ROOT/lib/tasks

-philip

---

<div class="post-metadata">

**Author:** ![Morgan\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/96bed5/32.png) [@Morgan\_P](https://www.ruby-forum.com/u/Morgan_P)\
**Post date:** [August 2, 2008, 1:07am UTC](https://www.ruby-forum.com/t/noob-question-where-are-rake-files-tasks-scripts-located/144783/3 "2008-08-02T01:07:52Z")

</div>

thanks Phillip

Uh, haven’t vendored rails, don’t know what that means yet. Any idea  
where rake gets its instructions for db:migrate if I haven’t vendored  
rails.

-Morgan

---

<div class="post-metadata">

**Author:** ![Morgan\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/96bed5/32.png) [@Morgan\_P](https://www.ruby-forum.com/u/Morgan_P)\
**Post date:** [August 2, 2008, 1:14am UTC](https://www.ruby-forum.com/t/noob-question-where-are-rake-files-tasks-scripts-located/144783/4 "2008-08-02T01:14:54Z")

</div>

> thanks Phillip
> 
> Uh, haven’t vendored rails, don’t know what that means yet. Any idea  
> where rake gets its instructions for db:migrate if I haven’t vendored  
> rails.

/usr/lib/ruby/gems/…/rails/…

Somewhere down there 🙂

“vendoring rails” means that you copy everything you need for rails  
into vendors/rails so that when you move it to another server you  
don’t have to deal with installing the rails gem and it’s friends…

% rake -T freeze

for more info… (and google)

-philip

---

<div class="post-metadata">

**Author:** ![Morgan\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/96bed5/32.png) [@Morgan\_P](https://www.ruby-forum.com/u/Morgan_P)\
**Post date:** [August 2, 2008, 6:09am UTC](https://www.ruby-forum.com/t/noob-question-where-are-rake-files-tasks-scripts-located/144783/5 "2008-08-02T06:09:33Z")

</div>

thanks Phillip!

---

<div class="post-metadata">

**Author:** ![Morgan\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/96bed5/32.png) [@Morgan\_P](https://www.ruby-forum.com/u/Morgan_P)\
**Post date:** [August 2, 2008, 1:15am UTC](https://www.ruby-forum.com/t/noob-question-where-are-rake-files-tasks-scripts-located/144783/6 "2008-08-02T01:15:29Z")

</div>

On Aug 1, 11:26 pm, Morgan P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> thanks Phillip
> 
> Uh, haven’t vendored rails, don’t know what that means yet. Any idea  
> where rake gets its instructions for db:migrate if I haven’t vendored  
> rails.

vendoring rails just means that the gems that make up rails are  
unpacked into your\_app/vendor/rails  
if you haven’t then the rake files will be inside where ruby keeps its  
gems. Depending on your setup this will be something like /usr/local/  
lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks

Fred
