Ruby on Rails Monday, November 15, 2010

On Nov 15, 2:50 am, David Kahn <d...@structuralartistry.com> wrote:
> I have been hacking around with this for a bit but want to see if there is
> an easy way:
>
> I am using Heroku and I have the wkhtmltopdf static binary in:
> rails_root/vendor/wkhtmltopdf
>
> I am not using any plug ins for wkhtmltopdf, just the executable, on purpose
> and want to keep it this way.
>
> My code wants to execute wkhtmltopdf:
>
>     # tell wkhtmltopdf to convert html file to pdf
>     %x[wkhtmltopdf-amd64 #{html_path} #{new_pdf_path}]
>
> But it is not found... is there a way I can tell my rails app to look in
> vendor/wkhtmltopdf for the exe?

Easiest thing is probably to construct the full path to your binary
rather than relying on what may or may not be in $PATH

Fred

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment