-
Notifications
You must be signed in to change notification settings - Fork 376
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
Using the ActiveRecord adapter with Rails 4.1 #32
Comments
#28 refers to a similar issue, but I was unable to reproduce. Try overriding the class Ahoy::Store < Ahoy::Stores::ActiveRecord
def track_visit(options)
Rails.logger.info ahoy.visit_id
super
end
end |
Any update? |
@ankane
This happens meanwhile really often with SQLite! |
Can you try the code above to see what gets logged? This one is perplexing, but seems to affect a decent number of people. |
@ankane I've added the code above in
Unfortunately nothing gets logged! Can I contact you via IRC or sth similiar? |
Sure, email me from my Github profile. |
Any update? |
We're running 4.1.5 and seeing quite a few of these in our platform as well. |
I have the same issues. |
@ckmorris @sergey-alekseev which database (and version) and |
|
ditto on the versions |
Tried this exact setup but still no luck. Tried it with the |
I used |
I had the same error and fixed it by these migrations:
|
@pbrueske unfortunately, adding a default will mask the issue as far as I can tell, since the database will generate its own UUID rather than store the one Ahoy gives it. I'd check that |
@ankane I enabled the same extension ( |
Not sure if this is the right place for this, but I also occasionally see the Unique constraint fail for ahoy_events.id
The message
The request payload to
Interestingly, the values of the id's in the ahoy_events table are not uuids.
|
After delving into ActiveUUID, there are some issues with the schema dumper (jashmenn/activeuuid#21). In order to get a uuid id column I had to modify the schema manually, despite having the proper migrations in place and migrated. before
after
That resolved my unique constraint issues in sqlite |
Following your suggestions on altering the migration
I get in fact an uuid unique id column, unfortunately it's possible to set an not null value to it (and I guess that shouldn't be possible for an primary key!)
ahoy doesn't work properly afterward (I guess it doesn't know whats the primary key anymore...). |
I think I might've fixed this. I'm using Ahoy 1.1.1 and ActiveRecord 4.1.5 and I hit this issue, and used a debugger to trace it down to the assignment of the generated It turns out the assignment doesn't happen because To fix this in the short term, I simply added |
Hi. I'm experiencing issues with this too. Tried lazyatom's solution but no joy. Error here:
PostgreSQL running on Heroku with Rails 4.2 |
FWIW, I'm running into this and I'm not using ahoy. Only seem to be seeing it with Rails 4.2, but I'm not sure if that's relevant or not. I'm debugging now and see that at some point, something added WRT the I went back through all of my migrations and added
...etc. in my migration output, yet my schema.rb still shows No solutions yet here, just thought I'd share my findings. |
I am having a similar issue, any new development? What's the deal with PR #44? |
Closing the issue, as UUID is no longer the default. |
Been seeing this recently in a Failing in rails 3 app:
Working in rails 5 app:
See how the postgres modifiers are defined? Not sure if this is the problem. Seems to have just started happening. Any new migrations that create a table only list
🤔 that's strange... ok
Thats better... and now it seems that failure is working. I'm not sure why that sequence isn't getting added. I have jumped between postgres versions so that could be an issue. |
Hi, I've followed the instructions from the README to enable ahoy using the built-in ActiveRecordStore but cannot get events or visits to work. The
id
is alwaysNULL
and the insert fails. The project is onRails 4.1.4
on Postgres. It's all configured using the default generators and no extra configuration. Any ideas?The text was updated successfully, but these errors were encountered: