2011-09-28 4 views
1

레일을 통해 앱을 사용할 때. 그리고 난 수행설치 문제 : Mac OS X Lion + Ruby 3에서 mysql2

$ bundle install 

나는이 오류 검색 :

Installing mysql2 (0.2.7) with native extensions /Users/workdreamer/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) 

     /Users/workdreamer/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb --with-mysql-config=/usr/local/mysql-5.5.13-osx10.6-x86_64/bin/mysql_config 
checking for rb_thread_blocking_region()... yes 
*** 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 
    --without-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/workdreamer/.rvm/rubies/ruby-1.9.2-p180/bin/ruby 
    --with-mysql-config 
extconf.rb:32:in ``': No such file or directory - /usr/local/mysql-5.5.13-osx10.6-x86_64/bin/mysql_config --cflags (Errno::ENOENT) 
    from extconf.rb:32:in `<main>' 

좋아, 프로그램이 바로지만을 /usr/local/mysql-5.5.13-osx10.6-x86_64/bin/ 때문에 mysql_config가 존재하지 않습니다.

$: cd /usr/local/mysql 
mysql/     mysql-5.5.16-osx10.6-x86/ 

그리고 내가 할 경우 : 존재 무엇 이다

$: gem install mysql2 
Building native extensions. This could take a while... 
Successfully installed mysql2-0.3.7 
1 gem installed 
Installing ri documentation for mysql2-0.3.7... 
Enclosing class/module 'mMysql2' for class Client not known 
Building YARD (yri) index for mysql2-0.3.7... 
Installing RDoc documentation for mysql2-0.3.7... 
Enclosing class/module 'mMysql2' for class Client not known 

을 분명히 그것은 단지 경고입니다.

영원히 문제를 해결하려면 어떻게해야합니까? 모두 감사합니다!

답변

0

가 나는 심볼릭 링크

ln -s /usr/local/mysql/mysql-5.5.16-osx10.6-x86/ /usr/local/mysql-5.5.13-osx10.6-x86_64 

그것은 완벽한 해결책은 아니지만 작품을 만들었습니다.