Skip to content

Rails 7 Jbuilder ActionView::MissingTemplate Error #555

Open
@kohheepeace

Description

@kohheepeace

Problem

In Rails 7, I got an "ActionView::MissingTemplate Error" error when I try to use jbuilder as described in the following document.

https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/docs/jbuilder.md

Solution

❌ Not working

<%= react_component('App', props: render(template: "/comments/index.json.jbuilder")) %>

✅ Working

<%= react_component('App', props: render(template: "/comments/index", formats: :json)) %>

Ref

https://stackoverflow.com/a/74683089/6037441

Metadata

Metadata

Assignees

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