1

I have update the database.yml to:

development:
    adapter: mysql2
    encoding: utf8
    reconnect: false
    database: dreamcity
    pool: 5
    username: root
    password: root
    host: localhost
    socket: /var/mysql/mysql.sock

I can open mysql by key in: rails dbconsole now. But when I try rake db:schema:load or rake db:reset, rails complains:

dyld: lazy symbol binding failed: Symbol not found: _mysql_init
  Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
  Expected in: flat namespace

dyld: Symbol not found: _mysql_init
  Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
  Expected in: flat namespace

What's the problem? I have included mysql2 in Gemfile and perform bundle install. Everything else is fine...

lkahtz
  • 4,706
  • 8
  • 46
  • 72
  • Take a look at Sam Soffes answer here: http://stackoverflow.com/questions/991708/rails-mysql-and-snow-leopard#1241484. The question is different than yours, but his answer appears to address your question. This question also appears very similar: http://stackoverflow.com/questions/3734745/rails-3-with-mysql-problem. – dontangg Feb 08 '11 at 16:42

0 Answers0