Page 187 - rake db:migrate
BACKGROUND:
I'm using InstantRails on Windows XP.
Here is my ruby info:
C:\InstantRails\rails_apps\shovell>ruby script/about
About your application's environment
Ruby version 1.8.4 (i386-mswin32)
RubyGems version 0.9.2
Rails version 1.2.2
Active Record version 1.15.2
Action Pack version 1.13.2
Action Web Service version 1.2.2
Action Mailer version 1.3.2
Active Support version 1.4.1
Application root C:/InstantRails/rails_apps/shovell
Environment development
Database adapter mysql
Database schema version 1
=====================================================
PROBLEM:
On page 187, when I do:
rake db:migrate
...the migration does not work.
This is what appears in the development log:
[4;36;1mSQL (0.000000)[0m [0;1mSET SQL_AUTO_IS_NULL=0[0m
[4;35;1mSQL (0.000000)[0m [0mMysql::Error: #42S01Table 'schema_info' already exists: CREATE TABLE schema_info (version int(11))[0m
[4;36;1mSQL (0.000000)[0m [0;1mMysql::Error: #42S01Table 'schema_info' already exists: CREATE TABLE schema_info (version int(11))[0m
=======================================================
Any ideas?
Thanks.
Results after MySQL Tables deleted
I deleted the 3 MySQL tables in shovell development, then ran rake and it succeeded, but now I have the tables without any rows.
Here is what happened:
C:\InstantRails\rails_apps\shovell>rake db:migrate
C:0:Warning: require_gem is obsolete. Use gem instead.
(in C:/InstantRails/rails_apps/shovell)
== CreateStories: migrating ===================================================
-- create_table stories, {:force=>false})
-> 0.1410s
== CreateStories: migrated (0.1410s) ==========================================
== CreateVotes: migrating =====================================================
-- create_table votes)
-> 0.0940s
== CreateVotes: migrated (0.0940s) ============================================
(1) How can I make this work without having to delete tables and recreate rows?
(2) What's the story with this warning message? How can I get rid of it. It occurs frequently.
C:0:Warning: require_gem is obsolete. Use gem instead.
Thanks in advance for any info.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks