Created
October 31, 2011 19:19
-
-
Save semipermeable/1328565 to your computer and use it in GitHub Desktop.
Tddium CarrierWave configuration
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
# config/initializers/carrierwave.rb | |
CarrierWave.configure do |config| | |
if Rails.env.production? | |
# production setup stuff | |
elsif Rails.env.test? | |
if ENV['TDDIUM'] | |
config.storage = :file | |
config.root = Dir.tmpdir | |
config.cache_dir = "carrierwave" | |
else | |
config.storage = :file | |
end | |
else | |
# other config | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@semipermeable any suggestions for using this with Capybara specs? When I try to set storage to
:file
for feature specs, I getNo route matches
errors for images that are uploaded. We set it to store inpublic/tmp
to get around this, but then it doesn't work consistently on Tddium.