Today I tried to build a docker for my rails 6.1.0 with active storage, I got the following error:
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.
And now I try to install the mimemagic
gem install mimemagic -v 0.3.5
I've got the following error:
ERROR: Could not find a valid gem 'mimemagic' (= 0.3.5) in any repository ERROR: Possible alternatives: mimemagic
It seems like the gem is gone. Can someone explain this?
what can be the solution to this issue?
Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.
When you first call bundle install, it will create this Gemfile. lock and uses this file in all subsequent calls to bundle install, which ensures that you have all the dependencies installed and will skip dependency installation.
Installation and usage To install a prerelease version (if one is available), run gem install bundler --pre . To uninstall Bundler, run gem uninstall bundler .
The Listen gem listens to file modifications and notifies you about the changes.
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. Upon further investigation, I found this github issue.
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.
Try to remove the Gemfile.lock and bundle again. Make sure you can actually do that because all your gems will be updated. In my Rails 6.1 instances, mimemagic is no longer used. Done.
For my case this was the solution from macOS: 'You will require a copy of the Freedesktop.org shared-mime-info database to be available. If you're on Linux, it's probably available via your package manager, and will probably be in the location it's being looked for when the gem is installed.
Few days ago, the mimemagic versions were yanked. More info can be found at:
You can modify your Gemfile as below:
gem 'mimemagic', github: 'mimemagicrb/mimemagic', ref: '01f92d86d15d85cfd0f20dabd025dcbd36a8a60f'
Try to remove the Gemfile.lock and bundle again. Make sure you can actually do that because all your gems will be updated. In my Rails 6.1 instances, mimemagic is no longer used. Done.
If that is not possible, you need to update mimemagic as it seems they removed all versions below 0.3.7: bundle update mimemagic
Update: I'm not sure if it's clear, but rails no longer use mimemagic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With