Fix missing enviorment in rake task

First the rake task needs to use the rails environment. and in deployment it must explicit said that he use the environment