MySQL OS X 10.7 Lion上的宝石 [英] MySQL gem on OSX 10.7 Lion
问题描述
我已经安装了MySQL 5.5.13 64位,并在成功安装MySQL之后尝试了以下操作:
env ARCHFLAGS = - arch x86_64gem install mysql -v ='2.8.1' - --with-mysql-dir = / usr / local / mysql - -with-mysql-lib = / usr / local / mysql / lib --with-mysql-include = / usr / local / mysql / include --with-mysql-config = / usr / local / mysql / bin / mysql_config
运行rake命令时 - 比方说rake db:migrate - 我得到这个:
未初始化的常量MysqlCompat :: MysqlRes
任何想法如何解决这个问题?
我一直在努力解决这个问题。上述两个指针工作。以下是我所做的:
-
添加到.zshrc或您的.bash_profile中:
export DYLD_LIBRARY_PATH =/ usr / local / mysql / lib:$ DYLD_LIBRARY_PATH
- <执行此操作:
$ benv ARCHFLAGS = - arch x86_64sudo gem install mysql -v ='2.8.1' - - with-mysql-dir = / usr / local / mysql --with-mysql-lib = / usr / local / mysql / lib --with-mysql-include = / usr / local / mysql / include --with-mysql- config = / usr / local / mysql / bin / mysql_config
Did anyone got the MySQL gem 2.8.1. working on OSX 10.7 ?
I've installed MySQL 5.5.13 64bit and tried the following after the successful installation of MySQL:
env ARCHFLAGS="-arch x86_64" gem install mysql -v='2.8.1' -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/mysql/bin/mysql_config
When running a rake command - let's say rake db:migrate - I get this:
uninitialized constant MysqlCompat::MysqlRes
Any idea how to fix that?
I had been struggling with this issue. The two above pointers worked. Here is what I did:
Added to .zshrc or your .bash_profile:
export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"
Executed this:
env ARCHFLAGS="-arch x86_64" sudo gem install mysql -v='2.8.1' -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/mysql/bin/mysql_config
这篇关于MySQL OS X 10.7 Lion上的宝石的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!