简体   繁体   English

在雪豹上编译mysql gem时遇到问题

[英]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. 我最近在Snow Leopard的新副本上安装了mysql-5.5.9-osx10.6-x86_64。

Though the version reports i386. 虽然版本报告为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. 我正在使用具有64位扩展名的Snow Leopard。 I have installed ruby-1.8.7-p334 [ x86_64 ] using RVM and ensured that it is selected. 我已经使用RVM安装了ruby-1.8.7-p334 [x86_64]并确保已选择它。

I am compiling the mysql gem using: 我正在使用以下方式编译mysql gem:

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: 虽然当我尝试运行Rails应用程序时出现以下错误:

/!\ FAILSAFE /!\  Tue Mar 15 17:31:32 -0400 2011
  Status: 500 Internal Server Error
  uninitialized constant MysqlCompat::MysqlRes
    /Users/jaredbrown/.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. 我相信gem正确构建,但仍然出现MySQL错误。 At this point I am scratching my head over this. 在这一点上,我正在为此抓挠头。

不要使用MySQL 5.5,请使用5.1版。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM