Skip to content
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

Geting error when using interval type in postgres #486

Open
bhanuone opened this issue May 13, 2018 · 6 comments
Open

Geting error when using interval type in postgres #486

bhanuone opened this issue May 13, 2018 · 6 comments
Assignees

Comments

@bhanuone
Copy link

bhanuone commented May 13, 2018

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?

@mereghost
Copy link
Member

@solnic @flash-gordon how does rom deals with it?

@mereghost mereghost self-assigned this Aug 31, 2018
@DangerDawson
Copy link

@bhanuone did you manage to solve this? I have hit exactly the same problem with the tstzrange type although I have loaded the pg_range extension

@DangerDawson
Copy link

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
Copy link
Member

I'm sorry for your experience. =( Good news is that we are updating ROM for the next release, hopefully to ROM 5.

@DangerDawson
Copy link

@mereghost that is fantastic news, really looking forward to having the latest version of ROM

@mereghost
Copy link
Member

Just some belated news: just confirming that ROM 5 will be included out of the box for the 2.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants