MySQL Ruby Gem on OS X Snow Leopard

I have been struggling with MySQL Ruby Gem running and running on Snow Leopard for the past few days.

I've tried all sorts of things to get this working and MySQL 5.1.37 x64 is currently installed. After fighting even to install the Gem, I believe I finally installed it, but whenever I try to access my Rails site, I immediately get the following error:

/!\ FAILSAFE /!\  Tue Sep 01 21:47:23 -0500 2009
Status: 500 Internal Server Error
    Client does not support authentication protocol requested by server; consider upgrading MySQL client
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/mysql.rb:453:in `read'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/mysql.rb:130:in `real_connect'

      

The remote server I am trying to connect to is running MySQL version 5.0.70 and other clients (including Sequel Pro running from my machine) can connect to them.

Below are some versions of the software installed on my machine:

  • MySQL 5.1.37 OS X 10.5 x86-64
  • Ruby 1.8.7 (2008-08-11 patchlevel 72) [generic-darwin10.0]
  • Gem version 1.3.5

I read other posts about how people are working on Snow Leopard, so I skipped the step. Any guidance would be greatly appreciated.

Thank!

+2


source to share


2 answers


There's a post about it , it basically says:

  • Compile it from source using: CC=gcc CFLAGS="-arch x86_64 -O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-arch x86_64 -O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-shared --with-plugins=innobase && make && sudo make install

  • Install the mysql gem with: sudo env ARCHFLAGS="-arch x86\_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config



I did this and it works for me.

+2


source


on the official blog of ruby ​​on the rails they said something about the leopard



http://weblog.rubyonrails.org/2009/8/30/upgrading-to-snow-leopard

0


source







All Articles