lib/imgkit/configuration.rb in imgkit-1.6.1 vs lib/imgkit/configuration.rb in imgkit-1.6.2

- old
+ new

@@ -9,10 +9,11 @@ @default_format = :jpg end def wkhtmltoimage @wkhtmltoimage ||= begin - path = (using_bundler? ? `bundle exec which wkhtmltoimage` : `which wkhtmltoimage`).chomp + path = (using_bundler? ? `bundle exec which wkhtmltoimage` : `which wkhtmltoimage`) + path = (path.split("\n").compact.last || "").chomp path = '/usr/local/bin/wkhtmltoimage' if path.strip.empty? # Fallback path end end