Created
December 1, 2011 01:18
-
-
Save steveclarke/1412506 to your computer and use it in GitHub Desktop.
Rails Configuration Howto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
moduleConfigurator | |
classApplication < Rails::Application | |
# By default, let OSX resolve the path to the binary | |
config.wkhtmltopdf = "wkhtmltopdf" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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