Trouble compiling mysql gem on Snow Leopard
I recently installed mysql-5.5.9-osx10.6-x86_64 on a fresh copy of Snow Leopard.
Though the version reports i386.
./mysql --version
Ver 14.14 Distrib 5.5.9, for osx10.6 (i386) using readline 5.1
Is this the expected behavior?
I am using Snow Leopard with 64 bit extensions on. I have installed ruby-1.8.7-p334 [ x86_64 ] using RVM and ensured that it is selected.
I am compiling the mysql gem using:
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-dir=/usr/local/mysql
Though when I attempt to run the Rails app I get the following error:
/!\ FAILSAFE /!\ Tue Mar 15 17:31:32 -0400 2011
Status: 500 Internal Server Error
uninitialized constant MysqlCompat::MysqlRes
/Users/jaredbro开发者_运维知识库wn/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:440:in `load_missing_constant'
/Users/jaredbrown/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `const_missing_not_from_s3_library'
/Users/jaredbrown/.rvm/gems/ruby-1.8.7-p334/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in `const_missing'
/Users/jaredbrown/.rvm/gems/ruby-1.8.7-p334/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:9:in `define_all_hashes_method!'
/Users/jaredbrown/.rvm/gems/ruby-1.8.7-p334/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:66:in `mysql_connection'
I believe the gem is building correctly but I still get the MySQL error. At this point I am scratching my head over this.
Don't use MySQL 5.5, use version 5.1.
精彩评论