2011-03-18 5 views
2

현재 Ruby 1.8.7 및 Mac 10.6.6 및 mysql 64 비트에서 mysql2 gem을 설치하려고합니다. 따라서 Rails 3 및 mysql을 함께 사용할 수 있습니다.루비 1.8.7을 사용하여 mysql2 gem 설치하기 Mac OSX 10.6

내가 명령 할 때 :

sudo gem install mysql2 

를 내가 얻을 :

 
Building native extensions. This could take a while... 
Successfully installed mysql2-0.2.6 
1 gem installed 
Installing ri documentation for mysql2-0.2.6... 
Enclosing class/module 'mMysql2' for class Client not known 
Enclosing class/module 'mMysql2' for class Result not known 
Installing RDoc documentation for mysql2-0.2.6... 
Enclosing class/module 'mMysql2' for class Client not known 
Enclosing class/module 'mMysql2' for class Result not known 

내가 여기에 SO에이 문제에 대한 권장 많은 것들을했지만 아무것도 도움을 보이지 않았다.

다음에해야 할 일에 대한 아이디어가 누구에게 있습니까?

편집 : rake db : migrate를 시도하면 다음과 같이 표시됩니다 : http://pastebin.com/tuPwQmqL. 나는 레일 서버도 할 수 없다.

편집 2 : 감사합니다!

답변

3

이것은 모듈 문서가 비어 있다는 경고 일뿐입니다. 문제가 발생해서는 안됩니다.

당신처럼 명령 할 수있는 경우

"레이크 dB : 마이그레이션" http://freddyandersen.wordpress.com/2010/10/03/mysql-5-5-snow-leopard-and-rails/등 모든 것이 잘 :

업데이트입니다. 이 링크는 문제를 해결합니다. 내 다른 Mac에서 동일한 문제에 직면했다 :

+0

문제는 내가 할 수 없다는 것입니다. 나는 rake db : migrate를 시도 할 때 다음과 같이 말합니다 : http://pastebin.com/tuPwQmqL. 나는 레일 서버도 할 수 없다. – bl00dshooter

+0

뭐라고합니까? 질문에 게시 –

+0

레이크가 중단되었습니다! dlopen (/Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9) : 라이브러리가로드되지 않았습니다. libmysqlclient.18.dylib 참조 :/Library/Ruby/Gems /1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle 이유 : 이미지를 찾을 수 없음 - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle /사용자/eduardo/사이트/rsps/Rakefile : 4 (- 추적으로 작업을 실행하여 전체 추적을 참조하십시오) – bl00dshooter

1

레일 3를 사용하는 경우 반드시 Bundler을 사용하고 sudo gem 설치를 수행하지 않아야합니다. mysql2를 Gemfile에 추가하고 bundle을 실행하십시오. 오류없이 설치하고 rake 명령을 실행할 수 있습니다.