PDFKit.configure do |config| if RUBY_PLATFORM =~ /64-linux/ wkhtmltopdf_executable = 'wkhtmltopdf-amd64' elsif RUBY_PLATFORM =~ /86-linux/ wkhtmltopdf_executable = 'wkhtmltopdf-i386' else raise "Unsupported. Must be running linux or intel-based Mac OS." end if wkhtmltopdf_executable config.wkhtmltopdf = File.join(File.dirname(__FILE__),'vendor', 'bin', wkhtmltopdf_executable).to_s end end