2012-09-25 74 views
0

這是我運行db:migrate時得到的錯誤。rake 0.9.2無法在bundle中識別exec

rake db:migrate rake aborted! You have already activated rake 0.9.2.2, but your Gemfile requires rake 0.9.2. Using bundle exec may solve this.

我然後運行捆綁高管耙0.9.2,這是我所得到的

'rake aborted!dlopen(/Users/connorphillips/.rvm/gems/ruby-1.9.3-p194/gems/mysql2 0.2.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib Referenced from: /Users/connorphillips/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle 
    Reason: image not found - /Users/connorphillips/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle' 

回答

0

您可能需要安裝正確的MYSQL2寶石。在你的Gemfile,請確保您已經mysql2

gem 'mysql2' 

然後重新打包,並嘗試

bundle exec rake db:migrate 
+0

我試圖運行,得到了耙中止! dlopen(/Users/connorphillips/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle,9):未加載庫:libmysqlclient.18.dylib 引用來自:/Users/connorphillips/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle 原因:找不到圖像 - /Users/connorphillips/.rvm /gems/ruby-1.9.3-p194/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle –

+0

你有本地安裝的mysql庫嗎?你能做「gem install mysql2」嗎?根據錯誤信息,看起來gem依賴的二進制文件沒有找到。 –

相關問題