title: How to fix a missing template error?
body: <p>I am making a website that has a user page that is supposed to allow users to create announcement posts.</p>
  
  <p>When I try to create a new announcement post through the website, an error pops up as follows:</p>
  
  <pre><code>Template is missing
  Missing template announcements/create, application/create with {:locale=&gt;[:en],     :formats=&gt;[:html], :handlers=&gt;[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in: * ".../app/views"
  </code></pre>
  
  <p>If I create the create.html.erb at the location, the form will return false as always.</p>
  
  <p>The user page (/app/view/users/show.html.erb):</p>
  
  <pre><code>&lt;% provide(:title, 'Admin Page') %&gt;
  
  &lt;% if signed_in? %&gt;
    &lt;div class="container"&gt;
      &lt;%= link_to "Sign out", signout_path, method: "delete" %&gt;
      &lt;br /&gt;
  
       &lt;% if @announcements.any? %&gt;
        &lt;h3&gt;Announcements (&lt;%= @announcements.count %&gt;)&lt;/h3&gt;
        &lt;ol&gt;
          &lt;%= render @announcements %&gt;
        &lt;/ol&gt;
        &lt;%= will_paginate @announcements %&gt;
      &lt;% end %&gt;
  
        &lt;%= render 'shared/announcement_form' %&gt;
    &lt;/div&gt;
  
  &lt;% else %&gt;
  &lt;script type="text/javascript"&gt; window.location.href= '&lt;%= signin_path %&gt;' &lt;/script&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>shared/_announcement_form.html.erb:</p>
  
  <pre><code>&lt;%= form_for(@announcement) do |f| %&gt;
    &lt;%= render 'shared/error_messages', object: f.object %&gt;
  
     &lt;div class="field"&gt;
      &lt;%= f.text_area :title, placeholder: "Compose new title..." %&gt;
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%= f.text_area :content, placeholder: "Compose new announcement..." %&gt;
    &lt;/div&gt;
    &lt;%= f.submit "Post", class: "btn btn-large btn-primary" %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>UsersController:</p>
  
  <pre><code>class UsersController &lt; ApplicationController
    def new
    end
  
    def show
      @user = User.find(params[:id])
      @announcement = current_user.announcements.build if signed_in?
      @announcements = @user.announcements.paginate(:page =&gt; params[:a_page], :per_page  =&gt; 10)
    end
  end
  </code></pre>
  
  <p>AnnouncementsController:</p>
  
  <pre><code>class AnnouncementsController &lt; ApplicationController
    before_action :signed_in_user, only: [:create, :destroy]
  
    def create
      @announcement = current_user.announcements.build(announcement_params)
  
      if @announcement.save
        flash[:success] = "Announcement created!"
        redirect_to root_url
      else
        flash[:error] = "Failed to create announcement!"
      end
    end
  
    def destroy
    end
  
    private
  
    def announcement_params
      params.require(:announcement).permit(:content)
      params.require(:announcement).permit(:title)
    end
  end
  </code></pre>
  
  <p>I have checked that I can create the announcement manually in the console. What am I doing wrong?</p>