mysql2 gem compiled for wrong mysql client library

Uninstalling and reinstalling the gem will often solve this issue with no need to download and move files around by hand. From your rails app directory: > gem uninstall mysql2 You have requested to uninstall the gem: mysql2-0.3.11 database_cleaner-0.9.1 depends on [mysql2 (>= 0)] If you remove this gems, one or more dependencies will not … Read more

Ruby gem mysql2 install failing [duplicate]

Ubuntu: sudo apt-get install libmysqlclient-dev #(mysql development headers) sudo gem install mysql2 — –with-mysql-dir=/etc/mysql/ That’s it! Result: Building native extensions. This could take a while… Successfully installed mysql2-0.2.6 1 gem installed Installing ri documentation for mysql2-0.2.6… Enclosing class/module ‘mMysql2’ for class Result not known Enclosing class/module ‘mMysql2’ for class Client not known Installing RDoc documentation … Read more

Error when trying to install app with mysql2 gem

For anybody still experiencing the issue: When you install openssl via brew, you should get the following message: Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries Generally there are no consequences of this for you. If you build your own software and it requires this formula, you’ll need … Read more

Gem::LoadError for mysql2 gem, but it’s already in Gemfile

If you have this error when upgrading to rails 4.2.4 (also with rails 4.1.5) try using this version of mysql2: gem ‘mysql2’, ‘~> 0.3.18′ Apparently mysql2 isn’t still compatible with newer version of rails because rails 4.2.4 is pretty new as the time of answering this question by me 8 September 2015 so use the … Read more

Error installing mysql2: Failed to build gem native extension

On Ubuntu/Debian and other distributions using aptitude: sudo apt-get install libmysql-ruby libmysqlclient-dev Package libmysql-ruby has been phased out and replaced by ruby-mysql. This is where I found the solution. If the above command doesn’t work because libmysql-ruby cannot be found, the following should be sufficient: sudo apt-get install libmysqlclient-dev On Red Hat/CentOS and other distributions … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)