Closed tjozwik closed 2 years ago
Ok. It's not Shrine's fault. Ruby 3.0 instroduced braking changes in positional and keyword arguments (https://makandracards.com/makandra/496481-changes-to-positional-and-keyword-args-in-ruby-3-0).
So:
store: Shrine::Storage::S3.new(
{ foo: :bar }
)
needs to be converted to:
store: Shrine::Storage::S3.new(
**{ foo: :bar }
)
Brief Description
After upgrading Ruby from 2.7.4 to 3.0.2, rake
db:migrate
task fails on Shrine S3 Storage initializer.Expected behavior
Migrations succeeds - Shrine's initializer does not fail.
Actual behavior
It fails on
shrine/storage/s3.rb:345
. Complete traceback:Simplest self-contained example code to demonstrate issue
config/initializers/shrine.rb
file:System configuration
Ruby version: 3.0.2 (& Rails 6.1.4.1)
Shrine version: both 3.4.0 & current repo's head (6bfb2da)