-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intermittent ActiveRecord::StatementInvalid: PG::CharacterNotInRepertoire Error #36
Comments
Removing ActiveUUID fixes the problem. So the uuid column type patch should not be applied for rails 4.0.2+ (and possibly earlier versions as well). |
@D1plo1d can you please elaborate on this? I'm also noticing an issue with intermittent behavior, but it's reproducible in tests. Initial run of tests fail when using spring, but saving any file and re-running the tests they pass. I'm guessing this is similar to the reload you were doing. Do you know how to use this gem on rails 4.0.2+ and get consistent results? |
@claude Sorry, that was all from a year ago on my end. I can't recall the details of the issue any more then what I wrote above. Edit: Not sure how to get the gem working consistently. Our solution was to removed it entirely. |
thanks for the response, so did you get uuid's working another way? |
Yeah. It's actually baked into Rails 4 so we just use the built in helpers now (instead of activeuuid). Here's an example: |
Ahh, yeah that works great for postgres. Unfortunately mysql doesn't have a native uuid type and so you need this gem to do the string to binary conversion for you. That way you don't have to store the uuid as a string in mysqll. Thanks for the help though! |
np, good luck! |
I'm getting the following error when I try to create a model with a UUID primary key in rails 4.0.2:
running
reload!
from the console seems to fix the problem so I'm wondering if this is a race condition in startup. I know rails added uuid's in 4 at some point and so I'm wondering if it's a conflict with the new uuid column type. Any ideas?Full error: https://gist.github.com/D1plo1d/1f5a57b90e2a0d331a94
The text was updated successfully, but these errors were encountered: