install failed on Heroku.
Deekor opened this issue · 7 comments
I added the gem to my gemfile and pushed to Heroku:
remote: You have added to the Gemfile:
remote: * wkhtmltopdf-heroku
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
hmm that's odd.
can you try to install it in your local environment?
I moved it out of the poduction group on my gemlist and that seemed to let it install. However the pdf generation still is not working. I get the error:
Bad wkhtmltopdf's path: /usr/local/bin/wkhtmltopdf
This is a project i have inherited at work and am moving over to Heroku so I'm not completely sure the whole configuration. Any ideas?
My gemfile
consists of:
gem 'wkhtmltopdf-binary'
gem 'wicked_pdf'
gem 'wkhtmltopdf-heroku'
Does this seem correct?
it's probably conflicting with wkhtmltopdf-binary
I know both gems are setting a binary path for wicked_pdf.
could you try to remove the binary
gem? Also this gem only works with cedar-14 stack (Ubuntu 14.04 LTS) you will need to use the same OS in your development environment in order to use this gem.
I removed the binary
gem and I am still getting the same error. I am on the cedar-14
stack.
Weirdly the pdf generation still works in my development environment (Mac OS) without the binary
gem
I found a config file in the project:
WickedPdf.config = {
#:wkhtmltopdf => '/usr/local/bin/wkhtmltopdf',
#:layout => "pdf.html",
:exe_path => '/usr/local/bin/wkhtmltopdf'
}
Im assuming this is the problem. Do I need any config file for this gem to work?
you probably have the binary installed in the system.
yea, could you comment out that exe_path configuration...the heroku gem will set that for you.
Yup that fixed it. Thanks for your help!