简体   繁体   中英

Paperclip on Rails 4.0 strange warnings

I'm trying to test my controller which deal with images by paperclip. However, when I ran rspec, there are a lot of strange warnings from paperclip I guess. The warnings are look like this:

I, [2014-08-17T03:20:20.852108 #36314]  INFO -- : Command :: identify -format '%wx%h,%[exif:orientation]' 'spec/assets/images/test_banner.jpg[0]' 2>/dev/null
I, [2014-08-17T03:20:20.866725 #36314]  INFO -- : Command :: identify -format '%wx%h,%[exif:orientation]' 'spec/assets/images/test_banner.jpg[0]' 2>/dev/null
I, [2014-08-17T03:20:20.881726 #36314]  INFO -- : Command :: identify -format '%wx%h,%[exif:orientation]' 'spec/assets/images/test_banner.jpg[0]' 2>/dev/null

Can anyone tell me what are those warnings and how can I fix it?

Environment infos: Rails 4.1.4, latest paperclip, mongoid-paperclip.

Those are not warnings, they are informational statements that paperclip is logging. You can turn paperclip's logging off for testing by adding the following in your config/environments/test.rb :

Your::Application.configure do
...
  Paperclip.options[:log] = false
...
end

See Paperclip readme for further details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM