Moved rails initialization to rake task dependency