Finished backporting to rails 2
Fixed rake task