ruby on rails - switching from pg gem to mysql, causing error -


my app using pg gem faced issues switched pg mysql when run bundle cause error.

my gem file

source 'https://rubygems.org'  # bundle edge rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.0.13'  # use pg database active record # gem 'pg' gem 'mysql2'  # use scss stylesheets gem 'sass' gem 'sass-rails', '~> 5.0'  # use uglifier compressor javascript assets gem 'uglifier', '>= 1.3.0'  # use coffeescript .js.coffee assets , views gem 'coffee-rails', '~> 4.0.0'  # user authentication gem 'devise', '~> 3.2'  # use materialize css gem 'materialize-sass' gem 'material_icons'  # use jquery javascript library gem 'jquery-rails'  # build json apis ease. read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 1.2'   #for authorization gem 'the_role'  group :doc   # bundle exec rake doc:rails generates api under doc/api.   gem 'sdoc', require: false end  group :development   gem 'binding_of_caller'   gem 'better_errors'   gem 'byebug' end 

here log:

fetching gem metadata https://rubygems.org/........... fetching version metadata https://rubygems.org/... fetching dependency metadata https://rubygems.org/.. resolving dependencies.... using rake 10.4.2 using i18n 0.7.0 using minitest 4.7.5 using multi_json 1.11.2 using thread_safe 0.3.5 using tzinfo 0.3.45 using builder 3.1.4 using erubis 2.7.0 using rack 1.5.5 using mime-types 2.6.2 using activerecord-deprecated_finders 1.0.4 using arel 4.0.2 using execjs 2.6.0 using json 1.8.3 using bcrypt 3.1.10 using coderay 1.1.0 using debug_inspector 0.0.2 using sass 3.4.18 using bundler 1.11.2 using byebug 8.2.1 using coffee-script-source 1.9.1.1 using thor 0.19.1 using orm_adapter 0.5.0 using tilt 2.0.1 installing mysql2 0.4.2 native extensions  gem::ext::builderror: error: failed build gem native extension.      /home/vinay/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20160116-12648-1cquvr6.rb extconf.rb checking ruby/thread.h... *** extconf.rb failed *** not create makefile due reason, lack of necessary libraries and/or headers.  check mkmf.log file more details.  may need configuration options.  provided configuration options:     --with-opt-dir     --without-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=/home/vinay/.rvm/rubies/ruby-2.2.1/bin/$(ruby_base_name) /home/vinay/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': compiler failed generate executable file. (runtimeerror) have install development tools first.     /home/vinay/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/mkmf.rb:587:in `try_cpp'     /home/vinay/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/mkmf.rb:1060:in `block in have_header'     /home/vinay/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking_for'     /home/vinay/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels) in postpone'     /home/vinay/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/mkmf.rb:321:in `open'     /home/vinay/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone'     /home/vinay/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/mkmf.rb:321:in `open'     /home/vinay/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/mkmf.rb:347:in `postpone'     /home/vinay/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for'     /home/vinay/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/mkmf.rb:1059:in `have_header'     extconf.rb:16:in `<main>'  extconf failed, exit code 1  gem files remain installed in /home/vinay/.rvm/gems/ruby-2.2.1@rails4/gems/mysql2-0.4.2 inspection. results logged /home/vinay/.rvm/gems/ruby-2.2.1@rails4/extensions/x86-linux/2.2.0/mysql2-0.4.2/gem_make.out using rdoc 4.2.0 using temple 0.7.6 using activesupport 4.0.13 using rack-test 0.6.3 using warden 1.2.3 using sprockets 3.3.5 using mail 2.6.3 using autoprefixer-rails 6.1.2 using uglifier 2.7.2 using better_errors 2.1.1 using binding_of_caller 0.7.2 using materialize-sass 0.97.1 using coffee-script 2.4.1 using haml 4.0.7 error occurred while installing mysql2 (0.4.2), , bundler cannot continue. make sure `gem install mysql2 -v '0.4.2'` succeeds before bundling. 

i not sure problem. 1 can me. in advance.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -