2014-11-21 185 views
2

當我運行「包安裝」我得到以下錯誤:錯誤捆綁安裝 - 「mysql2」

An error occurred while installing mysql2 (0.3.17), and Bundler cannot continue. 
Make sure that `gem install mysql2 -v '0.3.17'` succeeds before bundling. 

當我嘗試運行命令gem install mysql2 -v '0.3.17'我得到的錯誤:

ERROR: Error installing mysql2: 
ERROR: Failed to build gem native extension. 

Complete log

我試過重新安裝和安裝導軌。

我在MacOs上。

有人嗎?謝謝!

+0

這裏提供生成日誌,請 – 2014-11-21 19:37:42

+0

你會得到驗證答案: [http://stackoverflow.com/questions/3608287/error-installing-mysql2-failed-to-build-gem-native-extension] [1] [ 1]:http://stackoverflow.com/questions/3608287/error-installing-mysql2-failed-to-build-gem-native-extension – Rubyrider 2014-11-21 19:44:53

+0

我看到了這些主題,但仍然失敗。 – 2014-11-21 20:10:55

回答

2

如果您正在使用自制:

brew install mysql 

然後

gem install mysql2 -v '0.3.17' 
+2

它沒有工作,我再次安裝gem時出錯。 – 2014-11-21 20:12:16