SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simply Rails 2, db:migrate

    When I run db:migrate for the first time, I get the following error.

    == CreateStories: migrating ==================================================
    -- create_tablestories, {:force=>true})
    rake aborted!
    An error has occurred, this and all later migrations canceled:

    private method `String' called for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x248969c>


    Anyone else have this issue? Thanks.

  2. #2
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think i see the problem, The model generator created this for self.up:
    t.String :name
    t.String :link

    But the book shows:

    t.string :name
    t.string :link

    Obviously the generator becomes useless if I have to fix it everytime. Any suggestions?

  3. #3
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm an idiot, moving on. Thanks to anyone who read.

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2008
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


    I once created a bunch of resources when I was recreating an app, but instead of title:string etc. I accidently wrote string:title.

    Had to go through an rename loads of cases of 't.title :string'...


Tags for this Thread

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
  •