SitePoint Sponsor

User Tag List

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

    Chapter 5 - Page 127 rake db:migrate issue

    Hello,

    I'm on a mac and I had encountered the same problem posted by stoavio,

    http://www.sitepoint.com/forums/showthread.php?t=463949

    Using the info from that post, I am able to start MySQL. However, I get the following error when I run rake db:migrate on page 127:

    (in /Users/mac/shovell)
    == CreateStories: migrating ===================================================
    -- force()
    rake aborted!
    undefined method `force' for #<ActiveRecord::ConnectionAdapters::MysqlAdapter:0x26b9640>

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


    Any idea what is causing this? Do I need to add something to the migrate command to specify the path to MySQL?

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

    here is the error run with --trace

    rake db:migrate --trace
    (in /Users/mac/shovell)
    ** Invoke db:migrate (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    ** Execute db:migrate
    == CreateStories: migrating ===================================================
    -- force()
    rake aborted!
    undefined method `force' for #<ActiveRecord::ConnectionAdapters::MysqlAdapter:0x26b9140>
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/migration.rb:275:in `send'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/migration.rb:275:in `method_missing'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/migration.rb:259:in `say_with_time'
    /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/migration.rb:259:in `say_with_time'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/migration.rb:273:in `method_missing'
    ./db/migrate//001_create_stories.rb:3:in `real_up'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/migration.rb:212:in `migrate'
    /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/migration.rb:212:in `migrate'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/migration.rb:335:in `migrate'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/migration.rb:330:in `migrate'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/migration.rb:297:in `up'
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/migration.rb:288:in `migrate'
    /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/tasks/databases.rake:4
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:399:in `execute'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:369:in `invoke'
    /usr/local/lib/ruby/1.8/thread.rb:135:in `synchronize'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:362:in `invoke'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.rb:1935:in `run'
    /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/rake:7
    /usr/local/bin/rake:18

  3. #3
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    duh - sorry, i figured it out. forgot a colon, :force


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
  •