# About the rake migrate problem

**URL:** <https://www.ruby-forum.com/t/about-the-rake-migrate-problem/131044>\
**Category:** Rails\
**Created:** [March 5, 2008, 3:18pm UTC](https://www.ruby-forum.com/t/about-the-rake-migrate-problem/131044 "2008-03-05T15:18:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent.Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/90db22/32.png) [@Vincent.Z](https://www.ruby-forum.com/u/Vincent.Z)\
**Post date:** [March 5, 2008, 3:18pm UTC](https://www.ruby-forum.com/t/about-the-rake-migrate-problem/131044/1 "2008-03-05T15:18:25Z")

</div>

in the db/migrate directory ,there are five files(001–005),so i think  
the top version should be 5,right?

but,the problem is :

when i run the "rake migrate"command,it always migrate to VERSION  
2(NOT 5).And my schema.rb file also be modified to version 2.so  
strange.  
when i run “rake migrate version=5” command which i take the  
argument,then it succed to version 5.

how can explain the problem?

thanks

---

<div class="post-metadata">

**Author:** ![Vincent.Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/90db22/32.png) [@Vincent.Z](https://www.ruby-forum.com/u/Vincent.Z)\
**Post date:** [March 5, 2008, 3:56pm UTC](https://www.ruby-forum.com/t/about-the-rake-migrate-problem/131044/2 "2008-03-05T15:56:03Z")

</div>

On 5 Mar 2008, at 14:17, Vincent.Z wrote:

> argument,then it succed to version 5.

I’ve seen this bevore if you have an environment variable called  
version.

Fred

---

<div class="post-metadata">

**Author:** ![Vincent.Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/90db22/32.png) [@Vincent.Z](https://www.ruby-forum.com/u/Vincent.Z)\
**Post date:** [March 5, 2008, 4:19pm UTC](https://www.ruby-forum.com/t/about-the-rake-migrate-problem/131044/3 "2008-03-05T16:19:14Z")

</div>

thanks a lot.

fixed,i dont know the version variable stay for what.

On 3ÔÂ5ÈÕ, ÏÂÎç10Ê±54·Ö, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
