# Rake db:create, db:migrate ok but rake RAILS\_ENV=production db:create, db:migrate fails

**URL:** <https://www.ruby-forum.com/t/rake-db-create-db-migrate-ok-but-rake-rails-env-production-db-create-db-migrate-fails/169055>\
**Category:** Rails\
**Created:** [May 28, 2009, 8:54pm UTC](https://www.ruby-forum.com/t/rake-db-create-db-migrate-ok-but-rake-rails-env-production-db-create-db-migrate-fails/169055 "2009-05-28T20:54:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonsaid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5e925/32.png) [@simonsaid](https://www.ruby-forum.com/u/simonsaid)\
**Post date:** [May 28, 2009, 8:54pm UTC](https://www.ruby-forum.com/t/rake-db-create-db-migrate-ok-but-rake-rails-env-production-db-create-db-migrate-fails/169055/1 "2009-05-28T20:54:10Z")

</div>

Hello,

anybody have any clue why the following is happening: if i do “rake  
db:drop, rake db:create, rake db:migrate” everything is fine but if i  
do “rake RAILS\_ENV=testing db:drop”, then “rake RAILS\_ENV=testing  
db:create” & then “rake RAILS\_ENV=testing db:migrate” it fails on the  
migrate part, i get “Validation Failed: Group has already been taken”  
in the middle of the migration
