[Action View :: Missing Template] I didn't understand the meaning of the error statement, so I looked it up.

Read the error statement

ActionView::MissingTemplate in Users#index
Showing /home/vagrant/work/bk2-before_debug/app/views/users/index.html.erb where line #5 raised:

Missing partial users/_newform, application/_newform with {:locale=>[:en], :formats=>[:html, :text, :js, :css, :ics, :csv, :vcf, :vtt, :png, :jpeg, :gif, :bmp, :tiff, :svg, :mpeg, :mp3, :ogg, :m4a, :webm, :mp4, :otf, :ttf, :woff, :woff2, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip, :gzip], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}. Searched in:
  * "/home/vagrant/work/bk2-before_debug/app/views"
  * "/home/vagrant/.rbenv/versions/2.5.7/lib/ruby/gems/2.5.0/gems/devise-4.7.2/app/views"
Extracted source (around line #5):

3 <h2>New book</h2>
4 <%= render 'newform', book: @book %>
5
6
7 <h2>Users</h2>
8

This error itself has been resolved as follows.

The views / users / index.html.erb indicated by the error I wanted to quote views / books / _newform.

Resolved by changing render "newform" to render "books / newform".

ActionView::MissingTemplate in Users#index => There seems to be a problem with the index action in the Users controller.

Missing partial users/_newform, application/_newform => _newform is a common template Missing Templete doesn't load the common template well (?)

{:locale=>[:en], => The locale seems to be a file that is "used to manage the wording that is used frequently". It seems that it stores templates such as date and time formats and error statements.

I found it when I looked for it /config/locale スクリーンショット 2020-07-18 16.45.51.png By the way, the error statement of devise was also in this.

Does this mean that you are referring to locale / en?

▼ Reference locale https://qiita.com/d0ne1s/items/89846ebe97c9114865ca

:formats=>[:html, :text, :js, :css, :ics, :csv, :vcf, :vtt, :png, :jpeg, :gif, :bmp, :tiff, :svg, :mpeg, :mp3, :ogg, :m4a, :webm, :mp4, :otf, :ttf, :woff, :woff2, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip, :gzip] => Is it a supported format for reading?

:variants=>[] => variants are like one of the Action Packs, and they seem to define something to generate a view-related file that makes it convenient when browsing a page on a different device (appropriate ...). ▼ Reference Variants https://www.techscore.com/blog/2014/03/13/rails-4-1-0-actionpack-variants/

Also, ActionPack seems to be a package that works well with MVC view and controller implemented in Rails. The definition of creating a controller with $ rails g controller on terminal is It seems to be defined in this Action Pack. (It will take time to chase deeply, so this time I will limit myself to this level of understanding. Please point out if your understanding is incorrect!) ▼ Reference Action Pack https://qiita.com/toda-axiaworks/items/19be2ac4eff13c46dca9

In this case, variants are not particularly relevant, so is it blank? I do not understand…

:handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder] => It is a program that does not start in a normal system, but starts when a certain event occurs. ▼ Reference (About the handler http://mh.rgr.jp/memo/mg0038.htm#:~:text=%EF%BC%9E%20%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0%E8%A8%80%E8%AA%9E-,%E3%83%8F%E3%83%B3%E3%83%89%E3%83%A9%20%EF%BC%88handler%EF%BC%89,%E3%81%AF%E5%BE%85%E6%A9%9F%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E3%80%82&text=%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%E3%83%8F%E3%83%B3%E3%83%89%E3%83%A9%EF%BC%88interrupt%20handler%EF%BC%89%E3%81%A8,%E5%BE%85%E6%A9%9F%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%80%82

In this case ... I don't know ...

Searched in:

Impressions

Keywords that clearly exist as files can be considered, The system name? Is just an imagination. ..

I will add it as soon as I understand it.

Please comment if you have a supplement m (_ _) m

Recommended Posts

[Action View :: Missing Template] I didn't understand the meaning of the error statement, so I looked it up.
I didn't understand the meaning of injection such as DI or @Autowired, so I looked it up.
I didn't understand the topological sort, so I looked it up and implemented it in BFS, and then tried to solve the AtCoder problem.
I didn't know what to write in Maven's scope so I looked it up
I didn't understand the behavior of Java Scanner and .nextLine ().
I made a GitHub Action that makes it easy to understand the execution result of RSpec
I don't understand the devise_parameter_sanitizer method, so I'll output it here.
I used it without knowing the O / R mapping of rails, so I checked it.