title: Rails4: Template is missing error with using PDFKit
body: <p>I'd like to generate PDF file, so I am trying to use <code>PDFKit</code> but failing.</p>
  
  <p>The following error was displayed when input <code>http://localhost:3000/users/1.pdf</code> into my browser.</p>
  
  <blockquote>
    <p>Template is missing
    Missing template /users.show with {:locale=>[:en], :formats=>[:pdf], :variants=>>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in: * "c:/xxx/xxx/app/views"</p>
  </blockquote>
  
  <p>Please advise me on how to avoid this error.</p>
  
  <blockquote>
    <p>\config\initializers\pdfkit.rb</p>
  </blockquote>
  
  <pre><code>PDFKit.configure do |config|
    config.wkhtmltopdf = `which wkhtmltopdf`.to_s.strip
    config.default_options = {
      encoding:                "UTF-8",
      page_size:               "A4"
    }
  end
  </code></pre>
  
  <blockquote>
    <p>\app\controllers\users_controller.rb</p>
  </blockquote>
  
  <pre><code>  def show
      @user = User.find(params[:id])
  
      respond_to do |format|
          format.html
  
          format.pdf do
              html = render_to_string template: "users.show"
              pdf = PDFKit.new(html, encoding: "UTF-8")
  
              send_data pdf.to_pdf,
                  filename: "#{@user.id}.pdf",
                  type: "application/pdf",
                  disposition: "inline"
          end
      end
    end
  </code></pre>
  
  <blockquote>
    <p>\views\users\show.pdf.erb</p>
  </blockquote>
  
  <pre><code>  &lt;div class="row"&gt;
      &lt;div class="col-md-5" style="background:orange;"&gt;&lt;%= @user.id %&gt;&lt;/div&gt;
      &lt;div class="col-md-7" style="background:yellow;"&gt;&lt;%= @user.name %&gt;&lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>I use bootstrap <code>@import "bootstrap";</code> in custom.css.scss. Is that something to do with this error?</p>
  
  <blockquote>
    <p>\assets\stylesheets\custom.css.scss</p>
  </blockquote>
  
  <pre><code>@import "bootstrap";
  </code></pre>
  
  <p>My environment is <strong>Windows</strong></p>