DEV Community

Cover image for What's up with mimemagic breaking everything?

What's up with mimemagic breaking everything?

christine on March 25, 2021

If you are a Rails 6.1+ user, you probably have noticed something is up in the past couple days. Good morning everyone! If you have a Rails app ...
Collapse
 
trinhcanhphuc profile image
Phuc Trinh

Please install shared-mime-info and add FREEDESKTOP_MIME_TYPES_PATH in your environment.
if you use windows or linux, please download from gitlab.freedesktop.org/xdg/shared-... and extract it

Collapse
 
camobap profile image
Alex Bobrikovich

This package has no freedesktop.org.xml, just freedesktop.org.xml.in

Collapse
 
lavika profile image
Lavika Kurda

I renamed the file to freedesktop.org.xml and it worked for me.

Collapse
 
beendra profile image
Alexandra

That header is my favorite meme of the week 😂

Collapse
 
marvelxy profile image
Marvelous Akpotu

😂😂😂

Collapse
 
schmijos profile image
Josua Schmid

Regarding: github.com/rails/rails/issues/4175...

Maybe I miss a piece, but in't it allowed to ship GPL code alongside your code as long as it stays packaged and its license it kept? Or does this only apply to compiled code?

Collapse
 
joshpuetz profile image
Josh Puetz

Thanks for this great summary!

Collapse
 
dwpdx profile image
Daniel Wise

Christine thanks for the write-up. I had a momentary panic attack this morning running bundle install and this showed up right away!

Collapse
 
cseeman profile image
christine

Glad the write-up helped!I found it interesting tracking down the why on this one, and thought others in the community might enjoy the read.

Collapse
 
rsmithlal profile image
Robert Smith

Awesome, thanks for the update with the latest Rails version for the fix! I had no idea what was going on until I found your post. Thanks so much!!

Collapse
 
cseeman profile image
christine

Welcome! It was great to see Rails get out a fix so quick on this.

Collapse
 
frogandcode profile image
Rich Thornett

This write-up is great, thanks for sharing it. Am I missing something, or is there no communication of this sort from official Rails channels? (Have checked their Twitter, website, and forum and haven't found an announcement of the issue and how it's being addressed.) All I can find are threads in GitHub issues.

This seems crazy given how big an issue this is.

Collapse
 
cseeman profile image
christine • Edited

Looks like Rails just released an update that discusses this a bit, but I agree it did feel like it was kind of radio silence on this issue: weblog.rubyonrails.org/2021/3/26/m...

Collapse
 
davidarmendariz profile image
David Armendáriz

Any update on this? I still can't bundle install.

Collapse
 
egallup02360 profile image
egallup02360 • Edited

Install shared-mime-info manually, then run bundle update

OS X: brew install shared-mime-info
Linux (debian-based distro): apt-get install shared-mime-info (I think, I didn't test this)

Collapse
 
cseeman profile image
christine

Thanks for sharing a workaround, but this could potentially have copyright impacts if you start using pulling in shared-mime-info because I believe it is GNU GPL v2 licensed.

An alternative could also be github.com/rails/rails/issues/4175...

reference the yanked gem version mimemagicrb/mimemagic@01f92d8 in Gemfile until this issue is resolved:

gem 'mimemagic', github: 'mimemagicrb/mimemagic', ref: '01f92d86d15d85cfd0f20dabd025dcbd36a8a60f'

Thread Thread
 
egallup02360 profile image
egallup02360

Yes, this workaround wasn't in that thread when I posted this.

Absolutely the better option, by far.

Collapse
 
oscartzgz profile image
Oscar Tellez

Great, updating Rails, I did can build my docker container again, because the command "build install" was failing