Skip to content
Home » Your bundle is locked to mimemagic (0.3.5) but that version could not be found in any of the sources listed in your Gemfile.

Your bundle is locked to mimemagic (0.3.5) but that version could not be found in any of the sources listed in your Gemfile.

To solve Your bundle is locked to mimemagic (0.3.5), but that version could not be found in any of the sources listed in your Gemfile error follow below methods. When I attempted to build a docker for my Rails 6.1.0 with active storage, I received the following error:

ERROR LOG

Your bundle is locked to mimemagic (0.3.5), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of mimemagic (0.3.5) has removed it. You'll need to update your
bundle to a version other than mimemagic (0.3.5) that hasn't been removed in order to install.

How to solve Your bundle is locked to mimemagic (0.3.5), but that version could not be found in any of the sources listed in your Gemfile ?

 The Your bundle is locked to mimemagic (0.3.5), but that version could not be found in any of the sources listed in your Gemfile error occurs because of the mimemagic versions were yanked. More information about the issue can be found at:

Also you can modify your Gemfile as stated below.

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

Solution if you are using MacOS

If you are getting Your bundle is locked to mimemagic (0.3.5), but that version could not be found in any of the sources listed in your Gemfile. If you haven’t changed sources, that means the author of mimemagic (0.3.5) has removed it error in Mac OS.

Then follow the below commands :

brew install shared-mime-info
bundle update mimemagic

Alternate Solution :

Remove the Gemfile.lock file and re-bundle. Make sure you’re capable of doing so, as all of your gems will be changed. Mimemagic is no longer used in my Rails 6.1 instances.

If that isn’t possible, you’ll need to update mimemagic, as it appears that all versions prior to 0.3.7 have been removed: bundle update mimemagic

Update: I’m not sure whether this is evident, but rails does not utilise mimemagic any longer.

Hope the above solution works.

Also read :

fatal error: server could not be contacted when running pgAdmin4. ‘NoneType’ object has no attribute ‘value’
AbstractDynamicObject$CustomMessageMissingMethodException error