2009/7/16 Carl Franz <[email protected]>: > > First, I'm new to 'Ruby on Rails', but have 33 years experience in > programming (mainframe, unix, windows, you name it, I've programed on > it). Also, before I put this together I did read all of the threads out > there which mention the 'rake' error. > > I have to say, the responses to these poor people were pretty > non-informational. let's try to do better here... Please??? > > I'm using: > Windows XP rev3 > Ruby - 1.8.6 > Rails - 2.3.2 > Rake - 0.8.7 > mysql - 5.0.51a > Also, I'm running everything via the Windows command line. > > I have two files in the db/migrate director: > 20090715120000_create_entries.rb > 20090715150000_create_people.rb > > When I first got this error, I have only the first of the two files > (the create_entries.rb). SO, rather then argue with the system I simply > renamed the file to '003_create_entries.rb' and, low and behold, that > worked. I got the 'entries' table created. > > Next I wanted the table 'people' created > (20090715150000_create_people.rb) and, the rake db:migrate could not > find it. I tried changing the name to '010_create_people.rb' and > rerunning the 'rake db:migrate'. I did not seem to notice that file at > all and, of course, no table created. > > SO, I changed the file names back to the original names, and went into > the database and change the schema_migration.version to > '20090715120000'. When I ran the 'rake db:migrate' command we're back > to the original error. > > I then tried to clear the *(&^* schema_migration table and rename the > files to: > 001_create_entries.rb > 003_create_people.rb > and reran the rake command.... it argued with me about 'entries' already > existing, so I dropped 'entries' and ran it again.... Success.... > > WTF????? > > > > Apparently rake is confused about what version of the versioning it is > processing or something. I've tried upgradding everything, no joy. > > The trace from rake with: > 20090715120000_create_entries.rb > 20090715150000_create_people.rb > and schema_migration.version to '20090715120000' > > > Start Trace:*************************** > C:\xampp\ruby\guestbook>rake db:migrate --trace > (in C:/xampp/ruby/guestbook) > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > ** Execute db:migrate > rake aborted! > No migration with version number 3 > C:/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migrat > ion.rb:462:in `migrate' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migrat > ion.rb:404:in `down' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/migrat > ion.rb:384:in `migrate' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/databases.rake:116 > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in > `call' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in > `execute' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in > `each' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in > `execute' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in > `invoke_with_ > call_chain' > C:/xampp/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in > `invoke_with_ > call_chain' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in > `invoke' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in > `invoke_task > ' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in > `top_level' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in > `each' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in > `top_level' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in > `standard_ex > ception_handling' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in > `top_level' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in > `run' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in > `standard_ex > ception_handling' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in > `run' > C:/xampp/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 > C:/xampp/ruby/bin/rake:19:in `load' > C:/xampp/ruby/bin/rake:19 > > > Development log:************************ > [4;36;1mSQL (0.0ms) [0m [0;1mSHOW TABLES [0m > [4;35;1mSQL (0.0ms) [0m [0mSELECT version FROM > schema_migrations [0m > [4;36;1mSQL (0.0ms) [0m [0;1mSET NAMES 'utf8' [0m > [4;35;1mSQL (0.0ms) [0m [0mSET SQL_AUTO_IS_NULL=0 [0m > [4;36;1mSQL (0.0ms) [0m [0;1mSHOW TABLES [0m > [4;35;1mSQL (16.0ms) [0m [0mSELECT version FROM > schema_migrations [0m > [4;36;1mSQL (0.0ms) [0m [0;1mSHOW TABLES [0m > [4;35;1mSQL (0.0ms) [0m [0mSELECT version FROM > schema_migrations [0m
Have you fiddled with the setting of config.active_record.timestamped_migrations in environment.rb? This specifies whether to use timestamped or incrementing integer indexes for the migrations. Colin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

