在Leopard上设置Rails / Mysql时有哪些缺陷和解决方案? [英] What are the pitfalls and solutions when setting up Rails/Mysql on Leopard?

查看:73
本文介绍了在Leopard上设置Rails / Mysql时有哪些缺陷和解决方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在疯狂地试图在这里安装ruby mysql gem,并且我正在写这篇文章,所以如果其他人处于这种荒谬的情况下,他们不必像我一样经历同样的痛苦。 / p>

将MySQL gem安装到全新的Leopard副本上时常见的陷阱是什么?



在这种情况下,我使用

Leopard - OS 10.5.7
股票版本的Ruby - 1.8.6
Rubygems 1.3.5
5.1.36的32位版本 Mysql ,使用GUI安装程序安装。



我已经把我的机器的所有相关配置信息都放在这里作为启动器:



http://gist.github.com/158662



这里有什么信息有帮助,我需要做什么?



我明确地调用了构建的i386 archiecture,并且告诉mysql在哪里:

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

我试过以下指令 here here here

解决方案

ruby​​ mysql gem doesn'不像Leopard上的64位版本。如果可以的话,降级。

然后,您应该使用选项(将其更改为您的路径)调用sudo gem install mysql:

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

我。 (帮助我的博客文章是德文的,可以帮助你。)

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


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.

What are the common gotchas when installing the mysql gem onto a fresh copy of 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.

I've dumped all the relevant config info here for my machine as a starter:

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:

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. If you can, downgrade.

Then you should call the sudo gem install mysql with the options (change it to your path):

--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/

这篇关于在Leopard上设置Rails / Mysql时有哪些缺陷和解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆