Breaking Cloudinary after Rails 6.1 upgrade

Viewed 436

I upgraded to Rails 6.1, which broke my Cloudinary.

Whenever I go to an instance that has a photo attached, I now get this:

undefined method `service_name' for #<ActiveStorage::Blob:0x00007fb4b1c6de88>
Did you mean?  service

Any idea how to fix it?

2 Answers

Running rails active_storage:update solved my problem.

I had already run rails app:update, which created the following migration: AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId

But after running rails active_storage:update I got two extra migrations:

AddServiceNameToActiveStorageBlobs & CreateActiveStorageVariantRecords.

I think this is similar to the issue in another SO topic.

The accepted answer was to run

rails active_storage:update
rails db:migrate
Related