Hi,

I've been investigating an issue we've experienced the last few weeks since 
upgrading to Rails 5 and was hoping to see if anyone had an insight.

Issue: 
Every so often after our Rails server starts our API will return null for 
one enum on one model even though the enum's backing field is non-null in 
the database. Restarting the Rails server fixes the issue.

Setup:
Heroku + PostGres
ruby 2.4.1
rails 5.0.2
puma 3.9.0
(any many other gems)

I've tried reproducing this locally by running a script to start and stop 
the rails server to see if that would reproduce it, but found nothing after 
several hours.

Reading through the enum.rb module it looks like this could happen if the 
EnumType @mapping variable was empty, but I don't see how that would happen 
in practice, as it should be initialized when the enum is defined when 
loading all the ActiveRecord models.

Any ideas?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/4fd93286-c5f0-476f-aaa7-f65032b28cf3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to