SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot Xavius's Avatar
    Join Date
    Sep 2005
    Location
    Toronto, Canada
    Posts
    195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    table not found...??

    I'm in the process of making my way through Sitepoint's "Build your own Ruby on Rails Web applications" but I'm encountering an error.

    I'm running on Leopard btw.

    After running script/server, then loading localhost:3000 the page loads perfectly. When I click on "About your application’s environment" I get the following:

    Ruby version 1.8.6 (universal-darwin9.0)
    RubyGems version 1.0.1
    Rails version 2.0.2
    Active Record version 2.0.2
    Action Pack version 2.0.2
    Active Resource version 2.0.2
    Action Mailer version 2.0.2
    Active Support version 2.0.2
    Application root /Users/liamks/Documents/programs/rails/shovell
    Environment development
    Database adapter mysql

    However, when I go back to the terminal I get the following:
    arameters: {"action"=>"properties", "controller"=>"rails/info"}
    SQL (0.000215) SET NAMES 'utf8'
    SQL (0.000103) SET SQL_AUTO_IS_NULL=0
    SQL (0.000000) Mysql::Error: Table 'shovell_development.schema_info' doesn't exist: SELECT version FROM schema_info

    I've checked mysql via MySQLadministrator and the Table shovell_development does exist. I'm not sure why it's giving this error!

    my setup:
    development:
    adapter: mysql
    encoding: utf8
    database: shovell_development
    username: root
    password:
    host: localhost
    #socket: /tmp/mysql.sock

    when I uncomment the socket line, and comment out the host it still works.

  2. #2
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Whereabouts in the book are you? Have you run your first migration yet?

    "shovell_development" is the name of your database and Rails automatically keeps a table in that database called "schema_info" which tracks the current schema version that you are working under.

    As an example, the first time you run a migration, your schema_info version will be 1 and will increment each time you migrate database structure.

    Rgds

    Robin

  3. #3
    SitePoint Zealot Xavius's Avatar
    Join Date
    Sep 2005
    Location
    Toronto, Canada
    Posts
    195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    once I ran my first migration the problem went away - thanks for the help!


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
  •