views:

79

answers:

1

I have working fine my installation of Ruby on Rails on my Snow Leopard. I've tried for several days install MySQL with Ruby on Rails, all I've got when I run:

rake db:create

is:

(in /Users/naikon/RoR/test2)
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
  Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.4/ext/mysql2/mysql2.bundle
  Expected in: flat namespace

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

Trace/BPT trap

I've tried with MySQL 32 and 64 bits (and deleting all several times), install mysql gem in all the ways I've found on the internet, including

sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

I'm lost, frustrated and I really appreciate some help.

Thanks.

+1  A: 

Well lets start off with the fact your building the incorrect gem.

From your error report it appears your using Rails 3, and this doesn't use the "mysql" gem at all. It uses the mysql2 gem which offers a number of performance features.

You can read more about the mysql2 gem at http://github.com/brianmario/mysql2

I think you will be fine once you install the correct gem. =)

quest
It Works! Really appreciated quest, you've made my day ;)
Naikon