Closed snoblenet closed 5 years ago
Update, I am trying to address this the long way around with:
area.remote_screenshot_url = area.screenshot.url
area.save!
But I am getting:
ActiveRecord::RecordInvalid: Validation failed: Screenshot Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: `mogrify -blur-image 0 8 /var/folders/k9/vnpft_6d7qs6xmdb9_4svvmw0000gn/T/mini_magick20160503-8871-1jddvc6.png` failed with error:
mogrify: unrecognized option `-blur-image' @ error/mogrify.c/MogrifyImageCommand/4175.
from /Users/steven/.rvm/gems/ruby-2.2.2/gems/activerecord-4.2.5/lib/active_record/validations.rb:79:in `raise_record_invalid'
I have downloaded the image manually from S3 and opened it to check it is an image. The blur option works fine aside from in this situation. It reads:
version :blurry do
process :blur => [0, 8]
end
def blur(radius, sigma)
manipulate! do |img|
img = img.blur_image(radius, sigma)
img = yield(img) if block_given?
img
end
end
Bug still present in carrierwave 0.11.2:
NoMethodError: undefined method `body' for nil:NilClass
from /home/ubuntu/apps/celluloidheaven/shared/bundle/ruby/2.1.0/gems/carrierwave-0.11.2/lib/carrierwave/storage/fog.rb:226:in `read'
from /home/ubuntu/apps/celluloidheaven/shared/bundle/ruby/2.1.0/gems/carrierwave-0.11.2/lib/carrierwave/uploader/cache.rb:89:in `sanitized_file'
from /home/ubuntu/apps/celluloidheaven/shared/bundle/ruby/2.1.0/gems/carrierwave-0.11.2/lib/carrierwave/uploader/cache.rb:128:in `cache!'
from (irb):61:in `block in irb_binding'
from (irb):61:in `each'
from (irb):61
from /home/ubuntu/apps/celluloidheaven/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/commands/console.rb:90:in `start'
from /home/ubuntu/apps/celluloidheaven/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/commands/console.rb:9:in `start'
from /home/ubuntu/apps/celluloidheaven/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:69:in `console'
from /home/ubuntu/apps/celluloidheaven/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /home/ubuntu/apps/celluloidheaven/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
This error occours here, but versions are created on S3 nevertheless.
Related, I believe: https://github.com/carrierwaveuploader/carrierwave/issues/828
Sometimes we get this error:
A NoMethodError occurred in background at 2018-04-16 10:36:19 -0400 :
undefined method `body' for nil:NilClass
/home/deployer/apps/tfl/shared/bundle/ruby/2.4.0/gems/carrierwave-1.2.1/lib/carrierwave/storage/fog.rb:279:in `read'
-------------------------------
Backtrace:
/home/deployer/apps/tfl/shared/bundle/ruby/2.4.0/gems/carrierwave-1.2.1/lib/carrierwave/storage/fog.rb:279:in `read'
/home/deployer/apps/tfl/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.6/lib/active_support/core_ext/object/try.rb:17:in `public_send'
/home/deployer/apps/tfl/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.6/lib/active_support/core_ext/object/try.rb:17:in `try!'
/home/deployer/apps/tfl/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.6/lib/active_support/core_ext/object/try.rb:6:in `try'
/home/deployer/apps/tfl/shared/bundle/ruby/2.4.0/gems/carrierwave-1.2.1/lib/carrierwave/uploader/proxy.rb:44:in `read'
This seems to be still happening.
When are we going to have this released?
Any update on this? Running in the exact same problem on our Sidekiq + CarrierWave and really need this working. Works fine in a console, but not over a Sidekiq Job
Any solution for this yet?
This issue is 6 years old, why is there no fix yet?
The fix was already released long ago, as 2.0.0. Open another issue if you still have this.
I am storing images on S3.
I am uploading the images to the directory etc that CarrierWave expects using a client-side desktop application, not Rails.
This works. After calling
area.update_column :screenshot, "file.png"
within Rails, I can get the correct URL usingarea.screenshot.url
.The images are uploaded as
ACL: public-read
.My client-side desktop app only uploads the default version of the image. I then need Rails to create a blurry version.
So, I call
area.screenshot.recreate_versions!(:blurry)
, but this gives me this error:Thoughts?
Relevant lines from my
Gemfile.lock
: