Please tell me what the problem is and how to fix it?

Actually error:

ActionView::MissingTemplate in Chatrooms#show_rooms Showing /home/denis/prog/as_chat/app/views/chatrooms/show_rooms.html.erb where line #3 raised: Missing partial chatrooms/_chatroom with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}. Searched in: * "/home/denis/prog/as_chat/app/views" * "/var/lib/gems/2.3.0/bundler/gems/devise-a9bb7d031805/app/views" 

Controller

  class ChatroomsController < ApplicationController def show_rooms @chatrooms = Chatroom.all end end 

View

 <h1>Chatrooms</h1> <div> <%= render @chatrooms %> </div> 

Routes

 Rails.application.routes.draw do get 'chatrooms/show_rooms' resources :chatrooms devise_for :users root to: 'rooms#show' mount ActionCable.server => '/cable' end 

    1 answer 1

    You have a render method in a view looking for a template named _chatroom.html.erb . He's not needed.

     <h1>Chatrooms</h1> <div> <%= @chatrooms %> </div>