You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have spent so much time trying to get a Ruby 2.3.4, Rails 4.2 & mysql2 gem running on a MacBook M2 Pro.
It works on Ruby 2.4+ but unfortunately we have to stick with to the 2.3.4 version of Ruby for several months.
Also I have tested the some versions of Ruby and Rails on the same VM but using SQlite and it all works.
And have tried a bunch of different versions of the mysql2 gem.
Apple M2 Pro
macOS 13.4
Debian 11 (Bullseye) VM via OrbStack
Ruby 2.3.4
Rails 4.2.11.1
You could try this method what we did in some project to get jruby-9.2.7.0 working on M1 (to get pass Could not find a valid gem 'jruby-launcher')as it is not supported:
$ rbenv install jruby-9.3.10.0
$ mkdir -p /Users/YOUR_USER/.rbenv/versions/jruby-9.2.7.0/lib/ruby/gems/shared/gems
$ cp -R /Users/YOUR_USER/.rbenv/versions/jruby-9.3.10.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.19-java /Users/YOUR_USER/.rbenv/versions/jruby-9.2.7.0/lib/ruby/gems/shared/gems/
$ rbenv install jruby-9.2.7.0 # will still show error, ignore it.
$ ruby -v # will show jruby-9.2.7.0 and work
Switch to ruby 2.4
I suggest to go with mysql2-0.5.5 if there no requirement for ruby version as it has better support for M1.
In the end you have working mysql2 directory and copy over it after switching ruby version.
I have spent so much time trying to get a Ruby 2.3.4, Rails 4.2 & mysql2 gem running on a MacBook M2 Pro.
It works on Ruby 2.4+ but unfortunately we have to stick with to the 2.3.4 version of Ruby for several months.
Also I have tested the some versions of Ruby and Rails on the same VM but using SQlite and it all works.
And have tried a bunch of different versions of the mysql2 gem.
Apple M2 Pro
macOS 13.4
Debian 11 (Bullseye) VM via OrbStack
Ruby 2.3.4
Rails 4.2.11.1
I have a test app and easy setup steps here
The text was updated successfully, but these errors were encountered: