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
test.rb:6:in `block in <class:Users>': uninitialized constant ROM::Memory::Types::Int (NameError)
attribute :id, Types::Int
^^^^^
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/schema/dsl.rb:184:in `instance_exec'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/schema/dsl.rb:184:in `call'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/relation/class_interface.rb:114:in `block in schema'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/setup/finalize/finalize_relations.rb:78:in `build_relation'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/setup/finalize/finalize_relations.rb:50:in `block (2 levels) in run!'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/setup/finalize/finalize_relations.rb:33:in `each'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/setup/finalize/finalize_relations.rb:33:in `block in run!'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/relation_registry.rb:11:in `initialize'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/registry.rb:27:in `new'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/registry.rb:27:in `new'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/setup/finalize/finalize_relations.rb:32:in `run!'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/setup/finalize.rb:88:in `load_relations'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/setup/finalize.rb:64:in `run!'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/create_container.rb:40:in `finalize'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/create_container.rb:16:in `initialize'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/create_container.rb:61:in `initialize'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/create_container.rb:67:in `new'
from /Users/wilson/.asdf/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/rom-core-5.3.1/lib/rom/create_container.rb:67:in `container'
from test.rb:31:in `<main>'
Requiring 'rom/memory/types' didn't solve the issue.
I think that it's because the memory plugin doesn't define its own type container. Examples should be updated, but adding Types = Dry.Types() at the top of a script should work too.
Thanks! Ahh, right, it's the old name of the type, I forgot it completely because I've been dealing with quite a bunch of languages at once recently :) It messes with your brain when same things are named differently everywhere.
I've merged the PR, let's see if the pipeline will manage to deploy it
Describe the bug
When I run the example code from https://rom-rb.org/learn/core/5.2/associations/, I get an error:
Requiring 'rom/memory/types' didn't solve the issue.
To Reproduce
Execute the code from the associations documentation:
Expected behavior
The code should behave as documented.
My environment
The text was updated successfully, but these errors were encountered: