Error while migrating changes

Hello I am running this commad rails db:migrate on my rails application but I am getting this error

Fatal glibc error: malloc.c:4376 (_int_malloc): assertion failed: (unsigned long) (size) >= (unsigned long) (nb) Aborted (core dumped) KIndly someone help.

can you give a steps to reproduce or while what doing you are facing this issue?

Hello, this happens when I migrate my database. But I have a solution to this. Initially, I was using MySQL on Xampp to connect to my Ruby on Rails project. When I changed my database to SQLite3, the migrations worked—there were no errors at all. I think the issue was with the database I was using.

1 Like

Might want to try using the trilogy gem – it very reliably connects with a MySQL instance :slight_smile:

After commenting out the mysql2 gem and putting in trilogy, then in your config/database.yml change all mentions of mysql2 to instead be trilogy.

And that should be it!