Skip to content

Instantly share code, notes, and snippets.

@steveclarke
Created December 1, 2011 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steveclarke/1412506 to your computer and use it in GitHub Desktop.
Save steveclarke/1412506 to your computer and use it in GitHub Desktop.
Rails Configuration Howto
moduleConfigurator
classApplication < Rails::Application
# By default, let OSX resolve the path to the binary
config.wkhtmltopdf = "wkhtmltopdf"
end
end
## Use the appropriate environment file
Configurator::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# Point Heroku explicitly to the binary we need to use
config.wkhtmltopdf = "#{Rails.root}/bin/wkhtmltopdf"
end
cmd = [Configurator::Application.config.wkhtmltopdf, url, tmpfile.path]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment