Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An error occurred while installing mysql (2.9.1) and Bundler cannot continue

I'm trying to upload a Rails app to hostgator following this guide: http://support.hostgator.com/articles/specialized-help/technical/how-do-i-start-using-ruby-on-rails I'm getting an error in point 5.6. When I do:

rake generate_session_store

It says that couldn't find gem 'rack' and suggest me to run bundle install. When I do that:

Gem::Installer:ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.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.

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=/usr/bin/ruby
    --with-mysql-config
    --without-mysql-config

Gem files will remain installed in /home4/agtcorp/ruby/gems/gems/mysql-2.9.1 for inspection.
An error ocurred while installing mysql(2.9.1) and Bundler cannot continue.
Make sure that gem install mysql -v '2.9.1 succeeds before bundling.

I tried gem install mysql -v '2.9.1' obviously. I contacted the Hostgator support and a linux administrator said to me:

'I am seeing your issue is due to the path declared being incorrect. The Rakefile is currently located in /home4/agtcorp/rails_apps/agtcorp2/ . Perhaps if you update the installation to use the correct path, it will find the file in the full file path /home4/agtcorp/rails_apps/agtcorp2/Rakefile.'

I don't know how to do that. Please help!

like image 687
avmatte Avatar asked Dec 01 '25 21:12

avmatte


1 Answers

I think you are missing “libmysqlclient-dev”,have a try:

   sudo apt-get install mysql-server mysql-client libmysqlclient-dev 
like image 66
scottxu Avatar answered Dec 04 '25 11:12

scottxu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!