views:

25

answers:

2

Can someone explain me what happens when I add such dependency to my tasks? Which files are loaded etc.?

+1  A: 

All this dependency does is requiring your config/environment.rb file, ie. loading the entire Rails environment. You can do this whenever you need to use any code from your application in the rake tasks (ie. models), which is quite common.

Milan Novota
A: 

I've found interesting article about loading environment.rb maybe someone'll find it useful

Bohdan Pohorilets