Error: No migration with version number 2

Is this error familiar to anyone?? Any suggestions??

C:\test>rake db:migrate
(in C:/test)
rake aborted!
No migration with version number 2

(See full trace by running task with --trace)

C:\test>rake db:migrate --trace
(in C:/test)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
No migration with version number 2
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb
:410:in migrate' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb :357:inup’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/migration.rb
:342:in migrate' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake:99 c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:incall’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:ineach’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:ininvoke_with_call_c
hain’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:ininvoke_with_call_c
hain’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:ininvoke_task’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:ineach’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:instandard_exceptio
n_handling’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in
top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:inrun’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
standard_exceptio n_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:inrun’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
c:/ruby/bin/rake:16:in `load’
c:/ruby/bin/rake:16

Hi, do you have any data in your database? If not, please try doing the
following:
rake db:migrate VERSION=0
rake db:migrate

Good luck,

-Conrad

On Thu, Aug 28, 2008 at 12:32 PM, Michelle Mascarenhas <

Thanks Condrad,

see below…

C:\test>rake db:migrate VERSION=0
(in C:/test)
== 20080828124109 CreateThings: migrating

– create_table(:things)
-> 0.0150s
== 20080828124109 CreateThings: migrated (0.0150s)

C:\test>rake db:migrate
(in C:/test)
rake aborted!
No migration with version number 2

(See full trace by running task with --trace)

– having the same issue on rails 2.2.2 and 2.3.2 0 as long as I specify
version zero. I can get the db:migrate to work. If I leave off the
version, I get the error message above, only version number 3…

anyone seen this. Is there an environment setting that controls this?
I have tried

config.active_record.timestamped_migrations = false

which goes back to the 2.0.x migration numbering instead of the
timestamps, but that seems only to control the file names.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs