-
Notifications
You must be signed in to change notification settings - Fork 550
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
mysql2 does not build with mysql-client 8.3.0 #1346
Comments
If you're currently having issues on a mac and homebrew, this is what you should do to get your environment back: 1) Uninstall current installed version of mysql-client: $ brew uninstall mysql-client 2) Download 8.2 formulae: $ wget https://raw.githubusercontent.com/Homebrew/homebrew-core/2f35529519fb6a2cc361ce3d464a1bd181505a54/Formula/m/mysql-client.rb Or with curl: curl https://raw.githubusercontent.com/Homebrew/homebrew-core/2f35529519fb6a2cc361ce3d464a1bd181505a54/Formula/m/mysql-client.rb -o mysql-client.rb 3) Install 8.2: $ brew install ./mysql-client.rb |
For homebrew users, there's also a pinned formula available at 8.0:
|
@yboulkaid 8.0 still didn't do it for me, I don't quite remember why, but if it works for anyone, it should be better than downloading that formulae :) |
Ultimately, the fix shouldn't be to downgrade, the maintainers of this gem should fix their code. |
I follow your idea to install mysql-client 8.2. But it did not help me out:
Did I miss other steps? |
@xinlangzi I had the same issue and I solved it by doing the following:
I then connected my Rails app to a Mysql 8.2 instance via Docker. Hope this can help someone 😃 |
@xinlangzi Your log says you still have 8.3.0 installed.
as a workaround until |
For anyone who has the server running on the same system they are trying to install the gem on... I was able to get around uninstalling or downgrading my MySQL server by installing the mysql-client at version 8.2 using the info from @xjunior above and then simply calling the following:
Hopefully we get an official release to fix this soon though, however with a year between releases I'm not hopeful it'll be fast. |
@Uaitt thank you this worked for me 🙏 |
@Uaitt thanks a lot, it worked for me too 🙌 |
I've successfully installed the mysql2 gem, but I'm encountering the following error while attempting to start rails server using rails s: "cannot load such file -- /Users/satyakam/.rvm/gems/ruby-2.5.6/gems/mysql2-0.5.2/lib/mysql2/mysql2.bundle (LoadError)" Could you please assist me with resolving this issue? |
Hey @satyakampandya
|
Hey @Ahmedgagan The command you provided installs MySQL 8.3, and I can successfully install the mysql2 gem. However, I'm running into the following error when trying to start the Rails server.
|
@satyakampandya try a pristine installation of mysql2 |
No need to downgrade or uninstall, brew handles various versions of same package in parallel. You can try:
Depending on you environment you can get other errors, if so, let me know. |
I ended up using the |
@jairovm there is a an official gem to adapt it to older versions of rails as well. This is also something we're willing to try. https://github.com/trilogy-libraries/activerecord-trilogy-adapter |
Same issue. When we can expect a patch to be implemented? |
You can use However, I think installing |
I'm sticking with 8.0 and pining it on developers machines too. Yet, I'd like to understand why there hasn't been any feedback on #1347 yet. I don't believe my PR has the correct solution, as it could drop support for older versions of mysql-client that don't implement All of that said, Trilogy looks like a great solution and even an improvement, since it won't depend on any external library like |
@lipedjow Thanks, it works for me! |
build failure with mysql-client 8.3.0 brianmario/mysql2#1346
https: //github.com/brianmario/mysql2/issues/1346 Co-authored-by: Szymon Fiedler <[email protected]>
gemのアップデート回避のためにmysqlのバージョンを固定 brianmario/mysql2#1346
Compiling mysql2 with
mysql-client
8.3.0 fails:mysql_ssl_set
was deprecated on 8.2 and removed on 8.3.The text was updated successfully, but these errors were encountered: