noob question -- where are rake files/tasks/scripts located

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

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

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

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 :slight_smile:

"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

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

thanks Phillip!