Mysql Connector problem in Rails

Asked

Viewed 197 times

0

Talk personal, I’m not getting create a database for my Rails application it informs the following message :

Error

C: Ruby21-x64 Devkit Project>rake db:create DL is deprecated, Please use Fiddle rake aborted! Loaderror: Please install the mysql2 Adapter: gem install activerecord-mysql2-adapter (can’t Activate mysql2 (~> 0.3.10), already Activated mysql2-0.4.3-x64-mingw32. Make sure all dependencies are Added to Gemfile.)

Gem::Loadero: can’t Activate mysql2 (~> 0.3.10), already Activated mysql2-0.4.3-x64-mingw32. Make sure all dependencies are Added to Gemfile.

Tasks: TOP => db:create (See full trace by running task with --trace)

I don’t know why he started msql2 in version 0.3.10 and this causes the database not to be created. Any hints?

[UPDATE]

When I tell him to create the project he shows me this:

You’ve installed the Binary version of mysql2. It was built using Mysql Connector/C version 6.1.6. It’s Recommended to use the Exact same version to avoid potential issues.

At the time of building this Gem, the necessary DLL files Were retrieved from: http://cdn.mysql.com/Downloads/Connector-C/mysql-connector-c-6.1.6-win32.zip

This Gem includes vendor/libmysql.dll with redistribution notice in vendor/README.

  • It seems that the mysql adapter for ruby is not installed, use the command gem install activerecord-mysql2-adapter to install the adapitador and use gem update --system to update mysql2, your version is 0.3.10 and Rails is requiring version '0.4.3`

  • I already try to install actierecord-mysql2-Adapter but he says he installed but when I give the db:create rake again he asks again

  • When I speak to him he creates the project he shows me this: You’ve installed the Binary version of mysql2. It was built using Mysql Connector/C version 6.1.6. It’s Recommended to use the Exact same version to avoid potential issues. At the time of building this Gem, the necessary DLL files Were retrieved from: http://cdn.mysql.com/Downloads/Connector-C/mysql-connector-c-6.1.6-win32.zip This Gem includes vendor/libmysql.dll with redistribution notice in vendor/README.

1 answer

0

The problem is not in ruby, it is not finding is windows Dlls to connect with mysql.

Download the file that talks about the error:

http://cdn.mysql.com/Downloads/Connector-C/mysql-connector-c-6.1.6-win32.zip

Then extract in C: mysql-Connector folder

Then turn on the terminal:

gem install mysql2 --platform=ruby -- '--with-mysql-dir="C:\mysql-connector"'

And see if it installs.

  • I already did that and still it continues with the same error, as I said after the installation it sends an update error message that is here.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.