-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mysql 5.7 dev headers are not working correctly #15
Comments
Hi @joneslee85 can you run this command in terminal, and the try rake migrate again?
|
same problem here.
run this command does not help. |
@huyphams it does not really help unfortunately |
If anyone is still having this problem - I needed both a recent MariaDB and a 5.x MySQL server running in parallel on my Mac and ran into the same problem described above when I tried to use DBIng for the multi-server setup. I solved it by installing mysql 5.7 via brew AS WELL as via DBIng. The DBIng option is great for running the server as it works out of the box without any hassles - it also recognised my existing MariaDB install straight away. To configure the mysql2 gem for the 5.7 server I did: brew install mysql@5.7
gem install mysql2 -v '0.3.18' -- --with-mysql-config=$MYSQL5/bin/mysql_config (the MYSQL5 environment variable is set by the brew install, in my case it was /usr/local/Cellar/mysql@5.7/5.7.29) My last problem was then that the mysql2 gem was linked to the wrong mysql client library - when running the rails server I got
To fix that, locate the
I then checked the libraries it was linked against:
This then showed that the
To change that, I then ran
and now Rails is happy :-) |
It's been awhile. I've working around the issue by installing the MySQL DB separately so that its headers can be looked up and used by clients such as mysql2 rubygems. |
This is how I worked around this issue. It might not be the best solution but it suits my needs. The following code is from freshly created rails app.
|
Please fill out the detail below, it helps me investigate the bug:
Driver: MySQL 5.7.23
DBngin build number: 1.0 (14)
macOS version: macOS 10.14
The steps to reproduce this issue:
Installing MySQL2 Ruby client:
gem install mysql2 --version=0.4.10 -- --with-mysql-dir=/Users/Shared/DBngin/mysql/5.7.23
Attempt to run a rails migration with the driver yield:
The text was updated successfully, but these errors were encountered: