I’m using Shrine gem 2.19 in my Rails app, and after upgrading to Ruby 3.1, I encountered an issue with a method that previously worked fine in Ruby 2.7.
The method in question is cover_image_url, which generates a URL for an image:
<%= image_tag(album.cover_image_url(:large), alt: "", class: "card-img-top") %>
This line worked perfectly in Ruby 2.7, but after upgrading to Ruby 3.1, it raises the following error:
ActionView::Template::Error (wrong number of arguments (given 3, expected 2)):
I know that Shrine 3.x has newer features and possibly better Ruby 3.x compatibility, but I’d prefer to avoid upgrading to prevent significant changes to my codebase
Any guidance would be greatly appreciated!