Solidus: Solidus dependancy on paperclip makes it incompatible with ruby 3.0

Created on 14 Mar 2021  路  4Comments  路  Source: solidusio/solidus

https://github.com/solidusio/solidus/blob/master/frontend/app/views/spree/shared/_image.html.erb#L5 causes an error. It indicates undefined method `escape' for URI:Module

Solidus Version:
Spree.solidus_version 2.11.5
solidus_frontend 2.11.5
paperclip 6.1.0

To Reproduce
I don't seem to have task sandbox

Current behavior

Expected behavior
I expected a shop to be visible.

Screenshots
Capture1

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Firefox 86.0 (64-bit)

Additional context

A pull request has been created @ paperclip:
https://github.com/thoughtbot/paperclip/pull/2676

Most helpful comment

What's the solution if I wanna stay on stable? Downgrade ruby to 2.7.2?

Another solution could be switching to ActiveStorage.
If your application is already running on Rails >= 6.1, you can migrate any existing Paperclip uploads with a task like this (_could need some updates for Rails 6.1_) and change AppConfiguration#image_attachment_module and AppConfiguration#taxon_attachment_module settings.

An alternative but much more complex approach would be writing and registering your own image_attachment and taxon_attachment modules, with your custom attachment management implementation.

All 4 comments

I'm on my phone at this moment, but if I remember correctly we are moving to the maintained fork of paperclip with the next release.

What's the solution if I wanna stay on stable? Downgrade ruby to 2.7.2?

Yeah, for now 2.11 doesn't support Ruby 3.0.

What's the solution if I wanna stay on stable? Downgrade ruby to 2.7.2?

Another solution could be switching to ActiveStorage.
If your application is already running on Rails >= 6.1, you can migrate any existing Paperclip uploads with a task like this (_could need some updates for Rails 6.1_) and change AppConfiguration#image_attachment_module and AppConfiguration#taxon_attachment_module settings.

An alternative but much more complex approach would be writing and registering your own image_attachment and taxon_attachment modules, with your custom attachment management implementation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ericsaupe picture ericsaupe  路  4Comments

spaghetticode picture spaghetticode  路  3Comments

jarednorman picture jarednorman  路  5Comments

seand7565 picture seand7565  路  5Comments

brchristian picture brchristian  路  4Comments