Bug #17051
closedCrash when attempting to load schema in Rails application
Description
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.
Files
Updated by alanwu (Alan Wu) over 3 years ago
Support for the 2.4 series has ended. Could you see if upgrading to a newer version of Ruby solves the crash?
Updated by thoen@classroomparent.com (Tom Hoen) over 3 years ago
Thank you for responding Alan. Is 2.5.8 sufficient?
Updated by alanwu (Alan Wu) over 3 years ago
Thank you for responding Alan. Is 2.5.8 sufficient?
Actually, you seem to be running into a known problem in the mysql2 gem.
Please see https://github.com/brianmario/mysql2/issues/1036 and https://github.com/brianmario/mysql2/issues/1063.
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 thoen@classroomparent.com (Tom Hoen) over 3 years 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.
Updated by thoen@classroomparent.com (Tom Hoen) over 3 years ago
I have confirmed you are correct. After switching back to my original installation of mysql, all is good.
Updated by duerst (Martin Dürst) over 3 years ago
- Status changed from Open to Third Party's Issue