This article is more than 1 year old

Rails waves goodbye to mimemagic, welcomes Marcel to fix GPL MIME drama

If the license doesn't fit, you must commit

The maintainers of Rails, a Ruby-based framework for making web apps, have released three new versions to resolve a software licensing conflict that surfaced last week.

A Rails component called Active Storage included a dependency called mimemagic, which turned out to have been distributed under the wrong license. The mimemagic software library provided a component of Rails called Active Storage with mime type data – used to identify file formats – and was initially distributed under an MIT license.

But mimemagic has a dependency of its own called shared-mime-info that is distributed under the GPLv2 license. Under the terms of the GPLv2 license, mimemagic should have been GPLv2 licensed as well.

When the author mimemagic learned of the error, he withdrew the previous MIT-licensed version of his code, breaking many app build processes, and issued new versions under GPLv2.

Railway crash

Ruby off the Rails: Code library yanked over license blunder, sparks chaos for half a million projects


That proved unsatisfactory for Rails and other projects that preferred or required the MIT license because they don't want to be obliged to release their own code incorporating GPL source code under the same license. Thus began two days of trying to figure out how to replace a library incorporated into 172 other packages and found in over half a million software repositories.

Some developers created a revised version of mimemagic that removed the GPLv2 licensed data and made the software compliant with the MIT license once again. But the Rails team ultimately decided to drop mimemagic for another library called Marcel.

Late Friday, Rails 5.2.5, and were posted with a revised version of its Active Storage service that replaces its mimemagic dependency with Marcel 1.0.0.

"Before 1.0.0, Marcel – which is distributed under the terms of the MIT License, like Rails – indirectly depended on MIME type data released under the incompatible GNU General Public License," explained George Claghorn, a developer at Rails creator Basecamp, in a blog post announcing the release. "Marcel 1.0.0 instead directly packages MIME type data adapted from Apache Tika, released under the permissive and compatible Apache License 2.0."

A bit of work was required to make this happen. Marcel was essentially a wrapper around mimemagic so parts of it had to be adapted to be put under the MIT license. Marcel's table of mime signature data (known as magic number signatures) now comes from Apache Tika and thus is free of the GPLv2. ®

More about


Send us news

Other stories you might like