Skip to content

Instantly share code, notes, and snippets.

@j1n6
Created July 25, 2011 22:29
Show Gist options
  • Save j1n6/1105410 to your computer and use it in GitHub Desktop.
Save j1n6/1105410 to your computer and use it in GitHub Desktop.
Export gcc
# Let the gem find the gcc complier
$ export CC=/usr/bin/gcc-4.2
# Run this command to install the gem mysql
$ env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/mysql/bin/mysql_config
# For Rails 3.0.x, we should use mysql2 version 0.2.x
# Run this command to install mysql2 with version 0.2.6
$ env ARCHFLAGS="-arch x86_64" gem install mysql2 --version=0.2.6 -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/mysql/bin/mysql_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment