Hello,
I have updated to rails 3 on my Snow leopard. Previously i use sqlite for development. It's working fine when i rake db:create.
Now I'm trying to install mysql on my mac.
- I downloaded mysql-5.1.50-osx10.6-x86.dmg
- Installed all three file.(mysql-{version}-osx10.5-x86.pkg, MySQL.prefPane, MySQLStartupItem.pkg)
- execute this to install gem.
sudo env ARCHFLAGS="-arch i386" gem install mysql -- \ --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib \ --with-mysql-include=/usr/local/mysql/include
Everything is good. gem created with no error.
I create new project with
rails new p1 -d mysqlProceed with
rake db:create
it shows
Could not find gem 'mysql2 (>= 0, runtime)' in any of the gem sources. Try running `bundle install`.
Then I install new gem. sudo gem install mysql2.
same problem. i got
dyld: lazy symbol binding failed: Symbol not found: _mysql_init Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.3/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.3/lib/mysql2/mysql2.bundle Expected in: flat namespace Trace/BPT trap
I deleted the duplicate mysql2.bundle. The result is same. error.
i have read almost all articles on the net. But could solve this problem.
Is it because i installed 32 bit mysql on snow leopard? or my rubygems problem? Why rails 3 suddenly asking for mysql2 gem since i use '-d mysql'.
Rails 3 + MySql on mac
Thank you. Have a nice day.