Troubleshooting MySQL on Rails with Snow Leopard
As a user upgraded to Snow Leopard, it might have encountered difficulties running Rails apps due to MySQL issues. The bundled mysql.rb driver has been removed from Rails 2.2, prompting users to install the mysql gem. However, the installation can fail with an "image not found" error.
To address this issue, a successful solution involves:
sudo gem update --system sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Additionally, it is recommended to uninstall any existing MySQL gems from earlier versions of the operating system.
The above is the detailed content of How to Fix \'Image Not Found\' Errors When Installing the MySQL Gem on Rails with Snow Leopard?. For more information, please follow other related articles on the PHP Chinese website!