Rails 7 Jbuilder ActionView::MissingTemplate Error

Open
#555 1 comment 0 reactions 1 assignee View on GitHub

@ahangarha is already working on this.

Since Sep 18, 2023.

Assessment

This issue has not been assessed yet.

Description

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

Dominant language
JavaScript
Stars
1.7k
Forks
370
Avg merge
2d 15h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from shakacode/react-webpack-rails-tutorial

All issues in shakacode/react-webpack-rails-tutorial

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.