title: wicked_pdf Error: PDF could not be generated
body: <p><strong>Gemfile</strong></p>
  
  <pre><code>gem "wicked_pdf"
  gem "wkhtmltopdf-binary"
  </code></pre>
  
  <p>the error:</p>
  
  <pre><code>RuntimeError in CarsController#show
  
  Failed to execute:
  /usr/bin/wkhtmltopdf     --print-media-type    -q - - 
  Error: PDF could not be generated!
  Rails.root: /u/apps/zeepauto/autozeep_update
  </code></pre>
  
  <p><strong>cars_controller</strong></p>
  
  <pre><code>def show
      @class_showcar = true
      @class_admin = true
      @car = Car.find(params[:id])
      @search = Car.search(params[:search])
      @cars_see_special = Car.where(:special =&gt; "1").order('rand()').limit(3)
  
      respond_to do |format|
        format.html # show.html.erb
        format.xml  { render :xml =&gt; @car }
        format.pdf do
          render :pdf =&gt; "#{@car.carname.name}",
                 :print_media_type =&gt; true
        end
      end
    end
  </code></pre>
  
  <p><strong>show.html.erb</strong></p>
  
  <pre><code>&lt;p class="show_links"&gt;&lt;%= link_to  url_for(request.params.merge(:format =&gt; :pdf)) do %&gt;
    &lt;%= image_tag('/images/printversion.png', :alt =&gt; 'Download') %&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p><strong>wicked_pdf.erb</strong></p>
  
  <pre><code># config/initializers/wicked_pdf.rb
  WickedPdf.config = {
  #  :exe_path =&gt; '/var/lib/gems/1.8/bin/wkhtmltopdf'
    :exe_path =&gt; '/usr/bin/wkhtmltopdf'
  }
  </code></pre>