我在尝试mysql2为Rails 安装gem 时遇到了一些问题.当我尝试通过运行安装它bundle install或gem install mysql2它给我以下错误:
安装mysql2时出错:错误:无法构建gem原生扩展.
我该如何修复并成功安装mysql2?
我在运行命令
bundle install
Run Code Online (Sandbox Code Playgroud)
在我的Rails项目中,它给出了错误:
...
Using activerecord (3.0.11)
Using activeresource (3.0.11)
Using bigdecimal (1.1.0)
Installing fcgi (0.8.8) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/jjboat/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no
*** 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.
Run Code Online (Sandbox Code Playgroud)