ItGo.me Focus on IT Recommend

Home > mysql - gem mysql2 not installed on ruby on rails

mysql - gem mysql2 not installed on ruby on rails

up vote 1 down vote favorite This question already has an answer here: mysql2 not install with Ruby On Rails Error installing mysql2: Failed to build gem native extension 23 answers I have installed following versions: ruby 1.9.3p484 (2013-11-22) [i386-mingw32] rails 4.0.2 DevKit-tdm-32-4.5.2-20111229-1559-sfx rubygems-2.1.11 MySQL Server 5.6 mysql-connector-c-noinstall-6.0.2-win32-vs2005 I have run following three commands: $ gem i mysql2

$ gem install mysql2 -- '--with-mysql-lib="C:\Program Files\MySQL\MySQL Server 5.6\lib" --with-mysql-include="C:\Program Files\MySQL\MySQL Server 5.6\include" --with-mysql-dir="C:\Program Files\MySQL\MySQL Server 5.6"'

$ gem install mysql2 --platform=ruby -- '--with-mysql-lib="C:\mysql-connector-c-noinstall-6.0.2-win32-vs2005\lib" --with-mysql-include="C:\mysql-connector-c-noinstall-6.0.2-win32-vs2005\include" --with-mysql-dir="C:\mysql-connector-c-noinstall-6.0.2-win32-vs2005"'

above three cmds have following ERROR: * extconf.rb failed * Could not create Makefile due to some reason, prob

Recommend:ruby on rails - mysql2 gem installation on linux

e installing mysql2 (0.3.11), and Bundler cannot continue.Make sure that gem install mysql2 -v '0.3.11' succeeds before bundling. What do I need to do now ruby-on-rails
  |
  this question edited Aug 10 '12 at 10:35 Frederick C

ably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

mysql ruby-on-rails c ruby mysql2
  |
  this question edited Jan 24 '14 at 8:52 Малъ Скрылевъ 11.4k 3 27 46 asked Jan 24 '14 at 8:39 Akash 59 7 marked as duplicate by eugen, Wayne Conrad, Jan Dvorak, abligh, AShelly Mar 5 '14 at 17:26 This question was marked as an exact duplicate of an existing question.      show mkmf.log –  Малъ Скрылевъ Jan 24 '14 at 8:52



 |  1 Answers

up vote 0 down vote sudo apt-get install libmysql-ruby libmysqlclient-dev look at this question http://stackoverflow.com/a/3608756/1970061
  |
  this answer answered Jan 24 '14 at 9:29 Anil Maurya 1,712 1 13 24



 |  Not the answer you're looking for? Browse other questions tagged mysql ruby-on-rails c ruby mysql2 or ask your own question.

Recommend:The RVM-installed mysql2 gem works fine with Rails... but not with a standalone Ruby script

k properly with the mysql2 gem (using the MAMP libs rather than a mysql install). So everything was fine... Until I've tried to write a standalone ruby script (out of a Rails context). And now I can't get the mysql2 gem to work. From within

up vote 1 down vote favorite This question already has an answer here: mysql2 not install with Ruby On Rails Error installing mysql2: Failed to build gem native extension 23 answer

oriUlr:http://stackoverflow.com/questions/21328008/gem-mysql2-not-installed-on-ruby-on-rails

------splitte line----------------------------