Установка MySQL Gem с Rails 3 (Lion 10.7) - PullRequest
1 голос
/ 22 января 2012

Я получаю эту ошибку, когда пытаюсь установить гем MySQL с Rails 3 на OSX 10.7 Lion. Моя версия Ruby - это ruby ​​1.9.2p290. Я уже установил MySQL, и он отлично работает.

Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
ERROR: Failed to build gem native extension.

/Users/garethbarker/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb --with-mysql-dir=/usr/bin --with-mysql-lib=/usr/lib64/mysql

checking for mysql_ssl_set()... no
checking for rb_str_set_len()... yes
checking for rb_thread_start_timer()... no
checking for mysql.h... yes
llvm-gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/garethbarker/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
--with-mysql-config
--without-mysql-config


Gem files will remain installed in /Users/garethbarker/.rvm/gems/ruby-1.9.2-p290/gems/mysql-2.8.1 for inspection.
Results logged to /Users/garethbarker/.rvm/gems/ruby-1.9.2-p290/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

1 Ответ

0 голосов
/ 22 января 2012

Я помню, что у меня была похожая проблема на моей ОС Lion.Попробуйте это.Я нашел это в моем ~ / .bash_profile.Добавьте к вашему ~ / .bash_profile:

export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH

или

export DYLD_LIBRARY_PATH=/usr/local/mysql/lib
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...