SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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:

    SQL (0.000000) SET SQL_AUTO_IS_NULL=0
    SQL (0.000000) Mysql::Error: #42S01Table 'schema_info' already exists: CREATE TABLE schema_info (version int(11))
    SQL (0.000000) Mysql::Error: #42S01Table 'schema_info' already exists: CREATE TABLE schema_info (version int(11))

    =======================================================

    Any ideas?

    Thanks.

  2. #2
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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_tablestories, {:force=>false})
    -> 0.1410s
    == CreateStories: migrated (0.1410s) ==========================================

    == CreateVotes: migrating =====================================================
    -- create_tablevotes)
    -> 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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •