Mysql gem install in os x

Written by Walter Schreppers

This bit me twice (going to rails 3.0.7) then again going to rails 3.1.1.

This is the error you get after bundle exec, everything fine. But when you run rails s it fails:
Walter-Schrepperss-MacBook-Pro:biedmee_mercury wschrep$ rails s
dyld: lazy symbol binding failed: Symbol not found: _mysql_get_client_info
Referenced from: /Users/wschrep/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
Expected in: flat namespace



This is the solution:
sudo ARCHFLAGS="-arch x86_64" gem install mysql2 --version '~> 0.3.11' -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Ow yeah and prototype is not used anymore, also gives an error because you need to comment out a line in development.rb (I'm not using prototype anymore in favor of jquery for quite some time):

If you'd like to use jQuery instead of RJS for an existing application, delete or comment the following line from config/environments/development.rb

# config.action_view.debug_rjs = true



Back to archive