3

I'm trying to install mysql or mysql2 gem but it's not working.

I have already installed ruby-mysql.

Does this gem have the same features as the mysql2 gem?

jub0bs
  • 60,866
  • 25
  • 183
  • 186
Rbn
  • 135
  • 11
  • 1
    What "no working" means? It throws some errors? How do you know that it's not working? ;) – Kuba Płoskonka Sep 15 '14 at 15:26
  • 1
    The github site for `ruby-mysql` is mum about any deficiencies. So it's unclear how to answer your question. You could email the author from the github site and ask. It would be good to know what kind of error you hit attempting the `mysql` and `mysql2` gems. They should work. – lurker Sep 15 '14 at 15:28
  • need more clarification, how are you trying to install it? does it install cleanly? what version of ruby? Is the error in the installation or the use of the gem? – Doon Sep 15 '14 at 15:30
  • @Doon ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0] error on install – Rbn Sep 15 '14 at 15:33
  • i try to see other post about mysql2 gem installation but even those could not help me – Rbn Sep 15 '14 at 15:34
  • and what is the error on install? the logs from the gem build will normally tell you what is wrong – Doon Sep 15 '14 at 15:34
  • i got this error: *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. i read usually you got that by using wrong msql_config path but my config path is right:/Applications/MAMP/Library/bin/mysql_config – Rbn Sep 15 '14 at 16:23

2 Answers2

1

mysql is offered as gem for easy installation using RubyGems. It wraps unmodified tmtm's mysql-ruby extension into a proper gem. Please note that tmtm (Tomita Mashahiro) has deprecated development of this extension and only update it for bug fixes.

Read definition of mysql gem, and ruby-mysql gem.

Read difference from mysql, and mysql2 from this link.

Community
  • 1
  • 1
Mohamed Yakout
  • 2,868
  • 1
  • 25
  • 45
0

You need to install the adapter:

gem 'activerecord-mysql2-adapter', '~> 0.0.3'
Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574