2011-01-30 62 views
0

我已經成功安裝了MySQL 5.5.8和mysql2 gem 0.2.6。 但是當我執行rake db:create 它告訴我:MySQL 5.5.8與Snow Leopard和mysql2寶石問題

 
dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/mysql/lib/libmysqlclient.16.dylib 
    Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle 
    Reason: Incompatible library version: mysql2.bundle requires version 17.0.0 or later, but libmysqlclient.16.dylib provides version 16.0.0 - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle 
/Users/vvdpzz/mayday/Rakefile:4 
(See full trace by running task with --trace) 

我該怎麼辦? 如何解決這個問題?

回答

1

嘗試這樣的: 須藤install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib〜/ .rvm /寶石/紅寶石1.8.7/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle