# Bug? Rake::Task\["db:migrate"\].invoke doesn't work on development db

**URL:** <https://www.ruby-forum.com/t/bug-rake-task-db-migrate-invoke-doesnt-work-on-development-db/127429>\
**Category:** Rails\
**Created:** [January 29, 2008, 4:24am UTC](https://www.ruby-forum.com/t/bug-rake-task-db-migrate-invoke-doesnt-work-on-development-db/127429 "2008-01-29T04:24:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![akira](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@akira](https://www.ruby-forum.com/u/akira)\
**Post date:** [January 29, 2008, 4:24am UTC](https://www.ruby-forum.com/t/bug-rake-task-db-migrate-invoke-doesnt-work-on-development-db/127429/1 "2008-01-29T04:24:43Z")

</div>

Dear all,

task ‘test’ do  
Rake::Task[‘db:create:all’].invoke  
Rake::Task[‘db:migrate’].invoke  
end

Did I miss something or what? Turns out that this simple task would  
have migration done in the test db.

I’ve tried to “puts RAILS\_ENV” inbetween and it shows “development”,  
but migration’s still done in the test db.

Any ideas?  
Thanks.

ps. However if I break the 2 lines into 2 separate tasks, run them  
individually; then migration’s done in the development db as expected.
