Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with Marcel 1.0.3 #2729

Closed
toby-brilliant opened this issue Feb 29, 2024 · 4 comments
Closed

Incompatibility with Marcel 1.0.3 #2729

toby-brilliant opened this issue Feb 29, 2024 · 4 comments

Comments

@toby-brilliant
Copy link

toby-brilliant commented Feb 29, 2024

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:

mime_type = Marcel::TYPES[content_type]

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
Copy link

fwolfst commented Mar 2, 2024

Note that jeremy gives instructions about how to fix this in rails/marcel#98 (comment) .

@bvogel
Copy link

bvogel commented Mar 2, 2024

fixed by #2728

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

@Muscul
Copy link

Muscul commented Mar 6, 2024

Please upgrade gem version and apply this fix in rubgems.

@mshibuya
Copy link
Member

mshibuya commented Mar 9, 2024

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

@mshibuya mshibuya closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants