solidus icon indicating copy to clipboard operation
solidus copied to clipboard

Solidus dependancy on paperclip makes it incompatible with ruby 3.0

Open iqre8 opened this issue 4 years ago • 5 comments

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

iqre8 avatar Mar 14 '21 12:03 iqre8

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.

jarednorman avatar Mar 14 '21 16:03 jarednorman

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

iqre8 avatar Mar 15 '21 11:03 iqre8

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

jarednorman avatar Mar 15 '21 13:03 jarednorman

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.

filippoliverani avatar Mar 19 '21 13:03 filippoliverani

@filippoliverani I'm not even using paperclip, but solidus 3.0 still depends on kt-paperclip. Does solidus support ruby 3.0 & Rails 6.1?

zernie avatar Sep 05 '21 10:09 zernie

This has been addressed now. Solidus depends on kt-paperclip.

kennyadsl avatar Sep 06 '22 08:09 kennyadsl