Crash when attempting to load schema in Rails application
I am experiencing a crash when running
rake db:schema:load or
rake db:migrate in a Rails 4.2.9/Mysql2 0.4.0 application.
I don't believe it is a specific issue with a ruby version, as I have tried with Rubies 2.3.1, 2.3.8, and 2.4.9.
I also have another rails application (also Rails 4.2.9 and Mysql2 0.4.0 where I can successfully run those commands.
Yesterday I had to reinstall RVM and all of my Rubies. That is when the issue began. Up until then, I have had no issues running that command in the same application.
I have tried running the command after removing all of the gems in the application other than Rails and Mysql2.
Reviewing the stack trace, I am not seeing anything particular to the application that might be culprit.
I have also uninstalled and reinstalled Rails and Mysql2 gems.
Updated by alanwu (Alan Wu) about 2 months ago
Thank you for responding Alan. Is 2.5.8 sufficient?
Regarding Ruby versions, the 2.5 series doesn't receive bug fixes, so if you are running into a bug in Ruby itself you'd need to upgrade to 2.6 at least. Again, this seems to be a bug in
mysql2 rather than Ruby itself, though.
Updated by firstname.lastname@example.org (Tom Hoen) about 2 months ago
I think you are correct Alan. During my rebuild of the laptop, I inadvertently installed v 8 instead of 5.6. What threw me off was the other Rails app working without issue, using the same ruby version, mysql2 version, and Mysql database.