Rails, Mysql and Snow Leopard Issues - Missing Ruby Headers
Tried starting my development environement after installing Snow Leopard and got this error about the MySql gem not being included with Rails anymore.
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
Tried to install the gem and got this.
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Found a post that said to install the latest 64-bit MySql, got the same error. Found this thread that said to install XCode from the Snow Leopard disk and run this command and we're back in business.
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config