fix rake task for rails 3.1 support