Created
August 1, 2009 23:57
-
-
Save luislavena/159866 to your computer and use it in GitHub Desktop.
This file contains 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
# Load config/paperclip.yml settings | |
if paperclip_cfg = YAML.load_file("#{Rails.root}/config/paperclip.yml")[Rails.env] | |
paperclip_cfg.symbolize_keys! | |
command_path = paperclip_cfg.delete(:command_path) | |
# Replace Attachment defaults with configuration ones | |
Paperclip::Attachment.default_options.merge!(paperclip_cfg) | |
# Adjust ImageMagick path to work with Passenger | |
Paperclip.options[:command_path] = command_path | |
end |
This file contains 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
common: &local_settings | |
storage: :filesystem | |
url: "/assets/:class/:attachment/:id_partition/:basename_:style.:extension" | |
command_path: /opt/local/bin | |
development: | |
<<: *local_settings | |
staging: | |
command_path: /usr/bin | |
production: | |
command_path: /usr/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment