Doing a bit of digging I found a change in VC 3.9 that might(?) be a source of the problem: https://github.com/ViewComponent/view_component/pull/1950 specifically the changes to lib/view_component/base.rb:310.
It looks like when request is called it's calling the requestmethod in bridgetown-routes/lib/bridgetown-routes/view_helpers.rb:22 which looks at view.resource&.roda_app. In my case the "view" in question appears to be the component instance.
If I add
def resource
nil
end
to the BaseComponent everything boots and renders as normal. Not 100% sure if this is the correct work around it just works for me.
Bridgetown.configure do |config|
init :"bridgetown-view-component" do
ViewComponent::Base.config.view_component_path = "src/_components"
end
init :ssr
init :"bridgetown-routes"
end
Let me know if there's any other information I can provide that might be helpful.
Attempting to upgrade the
view_component
gem and running into an issue.Doing a bit of digging I found a change in VC 3.9 that might(?) be a source of the problem: https://github.com/ViewComponent/view_component/pull/1950 specifically the changes to
lib/view_component/base.rb:310
. It looks like whenrequest
is called it's calling therequest
method inbridgetown-routes/lib/bridgetown-routes/view_helpers.rb:22
which looks atview.resource&.roda_app
. In my case the "view" in question appears to be the component instance.If I add
to the
BaseComponent
everything boots and renders as normal. Not 100% sure if this is the correct work around it just works for me.Versions
bridgetown: 1.3.4 bridgetown-view-component: 2.0 view_component: >= 3.9.0
config/initializers.rb
Let me know if there's any other information I can provide that might be helpful.