When I say bundle install after some time I get the error:
Results logged to
/Users/JonyIve/.rvm/gems/ruby-1.9.3-p362@railsbabak/gems/mysql2-0.3.11/ext/mysql2/gem_make.out
An error occurred while installing mysql2 (0.3.11), and Bundler cannot
continue. Make sure thatgem install mysql2 -v '0.3.11'succeeds
before bundling.
So I do what it say, I run this command :
gem install mysql2 -v '0.3.11'
And then again I run Bundle Install but again I get the same error.
Where should I begin looking at to fix this issue?
And here is how my GemFile looks like:
source 'https://rubygems.org'
gem 'rails', '3.2.6'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
#START:mysql
group :production do
gem 'mysql2'
end
#END:mysql
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
#START_HIGHLIGHT
gem 'capistrano'
#END_HIGHLIGHT
# To use debugger
# gem 'debugger'
gem 'will_paginate', '~> 3.0'
Reason for this error could be due to lack of mysql header, so make sure you have installed mysql headers properly.
For Ubuntu/Linux flavor, Use following command to install MySQL client and development package
For mac OS:
Regards!