简体   繁体   English

在Leopard上设置Rails / Mysql时会遇到哪些陷阱和解决方案?

[英]What are the pitfalls and solutions when setting up Rails/Mysql on Leopard?

I've been going stir crazy trying to install the ruby mysql gem here, and I'm writing here so if anyone else is in this ridiculous situation, they don't have to go through the same pain as me. 我一直在疯狂尝试在这里安装ruby mysql gem,我在这里写作,所以如果其他人处于这种荒谬的境地,他们不必承受与我相同的痛苦。

What are the common gotchas when installing the mysql gem onto a fresh copy of Leopard? 将mysql gem安装到Leopard的新副本上时,常见的陷阱是什么?

In this case, I'm using 在这种情况下,我正在使用

Leopard - OS 10.5.7 The stock version of Ruby - 1.8.6 Rubygems 1.3.5 The 32bit version of 5.1.36 Mysql , installed using the GUI installer. Leopard-OS 10.5.7的原始版本Ruby-1.8.6 Rubygems 1.3.5使用GUI安装程序安装了32.bit版本的5.1.36 Mysql

I've dumped all the relevant config info here for my machine as a starter: 我已经将此处的所有相关配置信息都作为初学者转储到了我的机器上:

http://gist.github.com/158662 http://gist.github.com/158662

What info helps here, and what would I need to do? 什么信息在这里有帮助,我该怎么办?

I'm explicitly calling the i386 archiecture for the build, and tellign with where mysql is: 我明确地调用了i386体系结构进行构建,并告诉mysql在哪里:

sudo env ARCHFLAGS="-arch i386" gem install mysql -- \
    --with-mysql-dir=/usr/local/mysql \
    --with-mysql-lib=/usr/local/mysql/lib \
    --with-mysql-include=/usr/local/mysql/include

I've tried following instructions here , here , and here 我尝试按照此处此处此处的说明进行操作

The ruby mysql gem doesn't like the 64-bit version on Leopard. 红宝石的mysql gem不喜欢Leopard上的64位版本。 If you can, downgrade. 如果可以,请降级。

Then you should call the sudo gem install mysql with the options (change it to your path): 然后,您应该使用选项调用sudo gem install mysql(将其更改为路径):

--with-mysql-dir=/usr/local/mysql 
--with-mysql-lib=/usr/local/mysql/lib 
--with-mysql-include=/usr/local/mysql/include

Worked for me. 为我工作。 (The blog post which help me is in German, might help you anyway.) (对我有帮助的博客文章以德语提供,无论如何可能会对您有所帮助。)

http://www.code-schubser.de/2008/12/05/mysql-gem-unter-macosx-leopard-installieren/ http://www.code-schubser.de/2008/12/05/mysql-gem-unter-macosx-leopard-installieren/

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

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