title: wkhtmltopdf is not executable from wicked-pdf within war
body: <p>I am trying to create a pdf using wicked-pdf from Ruby On Rails. It works great in development mode, but when I deploy in production I get the error:</p>
  
  <pre><code>wkhtmltopdf is not executable
  </code></pre>
  
  <p>I have the wkhtmltopdf executable located at:</p>
  
  <pre><code>rails_root/bin/wkhtmltopdf-i386
  </code></pre>
  
  <p>Warbler is setup to include the bin folder in the war:</p>
  
  <pre><code>config.includes = FileList["classes/*","bin/*"]
  </code></pre>
  
  <p>I have wicked pdf configured to find the bin in the correct spot:</p>
  
  <pre><code>WickedPdf.config = {
    :exe_path =&gt; Rails.root.join('bin', 'wkhtmltopdf-i386').to_s
  }
  </code></pre>
  
  <p>I run warbler and then deploy the war on jBoss application server. When I try to generate a PDF I get the error about it not being executable. It runs fine in development mode - not in a war.</p>
  
  <p>The permissions on the binary should be fine:</p>
  
  <pre><code>-rwxr-xr-x  1 username group 11446024 Apr  3 11:40 wkhtmltopdf-i386
  </code></pre>
  
  <p>Instead of manually including the wkhtmltopdf binary, I tried using wkhtmltopdf-binary gem. This too worked fine in development mode, but Wicked PDF can't find the binary in production.</p>
  
  <p><strong>Update:</strong> I changed the wicked-pdf config to point to the binary provided by 'wkhtmltopdf-binary' gem when in production mode. It also is getting <code>wkhtmltopdf is not executable</code> error. The path ends up being: <code>jboss-5.1.0.GA/server/default/tmp/3j001-3g0fg5-hf2xi49o-1-hf2xiuld-9q/myrailsapp.war/WEB-INF/gems/gems/wkhtmltopdf-binary-0.9.9.1/bin/wkhtmltopdf_linux_386</code></p>