You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 13, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 13, 2025. It is now read-only.
Geting error when using interval type in postgres #486
I have a table(videos) with a column named duration of type interval. I am getting the following error when I try to run the app.
Hanami::Model::Error: missing attributes in ROM::Relation::Name(videos) schema: :duration
Then I followed the instructions specified here to enable interval type and added the following line in my model configuration block
Sequel.extension :pg_interval
then I got this error
LoadError: cannot load such file -- active_support/duration
So I added activesupport to my Gemfile and bundled. But rom-rb doesn't seem to recognize the type and I ended up getting the same error that occured in the beginning. How can I fix this?
So the only way I managed to get this to work, was to monkey patch rom-sql with the types I needed which I stole from a later version of rom-sql. If you need a hand I can post a gist?
Activity
mereghost commentedon Aug 31, 2018
@solnic @flash-gordon how does
romdeals with it?DangerDawson commentedon May 16, 2019
@bhanuone did you manage to solve this? I have hit exactly the same problem with the
tstzrangetype although I have loaded thepg_rangeextensionDangerDawson commentedon May 17, 2019
So the only way I managed to get this to work, was to monkey patch rom-sql with the types I needed which I stole from a later version of rom-sql. If you need a hand I can post a gist?
mereghost commentedon May 22, 2019
I'm sorry for your experience. =( Good news is that we are updating ROM for the next release, hopefully to ROM 5.
DangerDawson commentedon May 22, 2019
@mereghost that is fantastic news, really looking forward to having the latest version of ROM
mereghost commentedon Jul 5, 2019
Just some belated news: just confirming that ROM 5 will be included out of the box for the 2.0 release.