Was getting a “Mysql::ProtocolError” when running the ruby-mysql gem with the 64bit version of MySQL on Mac OS X 10.6.
Stackoverflow said to downgrade the version (done – modified the Gemfile to specify the exact version), but I still had to modify one line of code to get it to work.
The line of code that needed to be removed is this one
To find where that file is on your system, type
gem env. In my case it was
cd /Library/Ruby/Gems/1.8. Then navigate to the file in question, for me this was
vi gems/ruby-mysql-2.9.3/lib/mysql/protocol.rb +666.
The issue for ruby-mysql has been raised here.
Aside: why are there so many mysql<->rails issues? The native gem is a bitch to compile, the ruby one has this issue, and we are using a different gem in development on Mac to production on Linux all to workaround various issues.