我不知道如何安裝mysql2。爲什麼我不能在Ruby On Rails上安裝mysql2?
我使用:
- Ruby on Rails的3.2.14
- 的Ruby 2.0.0
- 的Mac OS X 10.9( 「小牛」)
Installing mysql2 (0.3.13)
An error occurred while installing mysql2 (0.3.13), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.13'` succeeds before bundling.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
*** 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.
Gem files will remain installed in /Users/kimingi/.bundler/tmp/1983/gems/mysql2-0.3.13 for inspection.
Results logged to /Users/kimingi/.bundler/tmp/1983/gems/mysql2-0.3.13/ext/mysql2/gem_make.out
An error occurred while installing mysql2 (0.3.13), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.13'` succeeds before bundling.
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
您是否首先安裝libmysqlclient-dev? – Bigxiang
生活在操作系統版本的最前沿的問題之一是您繼承移植現有代碼以處理未知/新代碼庫的問題。安裝人員測試已知版本,並經常嘔吐與未知的版本。 –
你見過這個http://stackoverflow.com/questions/5409761/installing-mysql2-gem-for-ruby-on-rails-with-mac-osx-10-6 –