I updated rails 3 on my snow leopard. I used to use sqlite for development. It works fine when I rake db: create.
Now I am trying to install mysql on my mac.
- I downloaded mysql-5.1.50-osx10.6-x86.dmg
- Installed all three files. (mysql- {version} -osx10.5-x86.pkg, MySQL.prefPane, MySQLStartupItem.pkg)
- run 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
Things are good. created without errors.
I am creating a new project with
rails new p1 -d mysql
Runrake db: create
shows
Could not find gem 'mysql2 (> = 0, runtime)' in any of the gem sources.
Try running `bundle install`.
. sudo gem install mysql2.
.
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
mysql2.bundle. . .
. .
, 32- mysql ? ?
rails 3 gem mysql2, '-d mysql'.
Rails 3 + MySql mac
. .