The password defined in config/database.yml is not used when you try to execute this command. Though all other database actions use the password. To get this command complete I temporarily had to remove the password on the database.
The generator shouldn't start the app or need to connect to the database at all. I think another gem might be messing with the environment.
Can you provide a full stack trace for the failure?