Je ne peux pas lancer la mise à jour du paquet à cause de la gemme "mysql2"

J'ai ceci dans le Gemfile:

gem 'mysql2'

Mais quand je lance bundle mise à jourj'obtiens ce message d'erreur:

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

J'ai essayé de la déplacer dans la section de production, comme ceci:

group :production do
  gem 'mysql2'
end

Mais après l'exécution de bundle mise à jourle résultat est le même. Cette section est traitée uniquement dans le mode de production, ou pas?

Comment se débarrasser de ce message d'erreur sur localhost?

EDIT: Le message d'erreur complet:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/radek/.rvm/rubies/ruby-1.9.3-p385/bin/ruby extconf.rb
checking for ruby/thread.h... *** 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.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/radek/.rvm/rubies/ruby-1.9.3-p385/bin/ruby
/Users/radek/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/radek/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from /Users/radek/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header'
from /Users/radek/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/radek/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/radek/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/radek/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/radek/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/radek/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/radek/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/radek/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/mkmf.rb:930:in `have_header'
from extconf.rb:9:in `<main>'
Gem files will remain installed in /Users/radek/.rvm/gems/ruby-1.9.3-p385/gems/mysql2-0.3.16 for inspection.
Results logged to /Users/radek/.rvm/gems/ruby-1.9.3-p385/gems/mysql2-0.3.16/ext/mysql2/gem_make.out
An error occurred while installing mysql2 (0.3.16), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.16'` succeeds before bundling.

Merci

source d'informationauteur user984621