Skip to content

Couldn't find template for digesting errors when components rendering other components #1

@cannikin

Description

@cannikin

Thanks so much for this! I've been using ViewComponents for over a year now and have been dying for a way to automatically compute the cache, so thanks so much for figuring this out!

I just tried this gem in my app and am getting a lot of "Couldn't find template for digesting" messages in my console. The components that are rendered in the view files themselves seem fine, but when one of those components renders another, I'm seeing these:

09:35:59 web.1  |   Couldn't find template for digesting: components/header_component
09:35:59 web.1  |   Couldn't find template for digesting: components/button_component
09:35:59 web.1  |   Couldn't find template for digesting: components/button_component
09:35:59 web.1  |   Couldn't find template for digesting: components/button_component
09:35:59 web.1  |   Couldn't find template for digesting: components/avatar_component
09:35:59 web.1  |   Couldn't find template for digesting: components/button_component
09:35:59 web.1  |   Couldn't find template for digesting: components/reactions_component
09:35:59 web.1  |   Couldn't find template for digesting: components/label_component
09:35:59 web.1  |   Couldn't find template for digesting: components/label_component
09:35:59 web.1  |   Couldn't find template for digesting: components/avatar_component
09:35:59 web.1  |   Couldn't find template for digesting: components/button_component
09:35:59 web.1  |   Couldn't find template for digesting: components/button_component
09:35:59 web.1  |   Couldn't find template for digesting: components/button_component
09:35:59 web.1  |   Couldn't find template for digesting: components/label_component
09:35:59 web.1  |   Couldn't find template for digesting: components/projects/labels_list_component
09:35:59 web.1  |   Couldn't find template for digesting: components/projects/participants_component

They're all normal, top-level components in app/components, and rendered with standard <%= render ButtonComponent.new(...) %> syntax.

I place all my sidecar files in subdirectories, so:

app/components/button_component.rb
app/components/button_component/button_component.html.erb

Thanks for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions