Closed maryammouse closed 3 years ago
@maryammouse v0.4.1 requires ruby 2.2 or higher precisely because of support for the prepend
keyword. The issue you are seeing with v0.3.2 is a duplicate of #14 - which is addressed by PR #15 , but the first released version to get this fix is v0.4.1.
At this point, I believe you have two choices: 1) Fork the repo and apply the commit that fixes this (https://github.com/pinnymz/migration_comments/pull/15/commits/c47d86df8d6d95bae9105ec9e9bdff61a1d1e0f7) to the v0.3.2 release 2) Upgrade to Ruby 2.2 or higher (strongly recommended)
I'm having difficulty replicating this issue, and it may well a problem elsewhere. However, if I use ActiveRecord 4's built-in :uuid functionality (so it can set a primary key as a uuid that generates by itself) , then that functionality breaks whenever this gem is installed.
If I use 0.3.2, then my migrations fail as for some reason no default is set for the primary uuid key column. I do not understand why. My guess is that somehow the way dependencies are set means that an older version of ActiveRecord gets used to run migrations?
If I use 0.4.1, the migrations work fine, but I run into this issue which I suspect is related to the fact that my app uses Ruby 2.0.0:
Would really love to get to the bottom of this!