carrierwaveuploader / carrierwave

Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
https://github.com/carrierwaveuploader/carrierwave
8.78k stars 1.66k forks source link

Incompatibility with Marcel 1.0.3 #2729

Closed toby-brilliant closed 6 months ago

toby-brilliant commented 7 months ago

Marcel released recently, for the first time in years. As the project mentions here, it seems CarrierWave was relying on a private constant which changed.

This line: https://github.com/carrierwaveuploader/carrierwave/blob/ed8799191824a4d2762eb1028c01220102699377/lib/carrierwave/downloader/remote_file.rb#L36

does not work with the newly released Marcel 1.0.3 as Marcel::TYPES has been changed. This yields stack traces that look something like:

     NameError:
       uninitialized constant Marcel::TYPES
     # ./app/models/attachment.rb:44:in `block in set_remote_url'
     # ./app/models/attachment.rb:40:in `set_remote_url

any time set_remote_url is used.

For anyone stuck on this, you can add Marcel directly to your Gemfile and pin it to the last version (e.g. gem "marcel", "=1.0.2")

fwolfst commented 7 months ago

Note that jeremy gives instructions about how to fix this in https://github.com/rails/marcel/issues/98#issuecomment-1973839866 .

bvogel commented 7 months ago

fixed by https://github.com/carrierwaveuploader/carrierwave/pull/2728

luckily I found/suggested the same fix that @jeremy suggested.

Muscul commented 7 months ago

Please upgrade gem version and apply this fix in rubgems.

mshibuya commented 6 months ago

Released 3.0.6. https://rubygems.org/gems/carrierwave/versions/3.0.6