Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined method "get_construct_args" #131

Closed
konung opened this issue Sep 8, 2024 · 4 comments
Closed

Undefined method "get_construct_args" #131

konung opened this issue Sep 8, 2024 · 4 comments

Comments

@konung
Copy link

konung commented Sep 8, 2024

Hi.

I actually discovered a bug related to minimagick 5.0 support mentioned in issue #125

I updated image_processing to 1.13 and ran into an error

# Just processing a PDF attachment in my model 

model = Label.last
model.original_file.representation(resize_to_limit: [100, 100]).processed

NoMethodError: undefined method `get_construct_args' for #<Vips::Operation:0x000000012a3dfba0 @ptr=#<FFI::Pointer address=0x0000600000a19f80>, @struct=#<Vips::Operation::ManagedStruct:0x000000012a3df808>, @references=[]>
from /Users/konung/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/image_processing-0.11.2/lib/image_processing/vips.rb:105:in `select_valid_options'

Downgrading to 1.12.2 resolved the issue.

The error is a bit cryptic, as it's pointing to Vips, when it seems that Minimagick support is the cause ( I think?) . Still haven't figured out the true root cause. Just thought it bring it up here.

@janko
Copy link
Owner

janko commented Sep 8, 2024

Active Storage is using the libvips backend here (it's the default), so this is unrelated to MiniMagick. I don't know at the moment what caused this apparent regression, I will take a look.

@janko
Copy link
Owner

janko commented Sep 8, 2024

You said you upgraded ImageProcessing to 1.13.0, but the stack trace shows version 0.11.2, which is ancient. So, that's likely the root cause of the error.

If you're still experiencing it with the most recent version, please post a self-contained example that reproduces the issue (without Active Storage), and then we can re-open.

@janko janko closed this as completed Sep 8, 2024
@TravelingTice
Copy link

Also stumbled into this issue and was also mistakenly on version 0.11.2.. even though I just added gem 'image_processing' to my Gemfile... apparently we need to specify , '~> 1.12' should be used?

@janko
Copy link
Owner

janko commented Sep 23, 2024

Not sure if something else is depending on a lower version of MiniMagick or ruby-vips, which might make Bundler prefer versions of ImageProcessing that didn't have them as dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants