-
Notifications
You must be signed in to change notification settings - Fork 440
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
Will not build (3.7, 3.8, 4.1) #112
Comments
on MacOS you need to install via homebrew:
|
I build for Ruby 2.7.1. But this should also work for other versions... Alpine For images I build based off Debian Buster, I didn't have to do anything. |
Considering that mimemagic is a dependency of rails, it is lumped in with ActiveStorage and ActionMailbox. My rails project uses neither so it never calls mimemagic. Needing to have the hurdle of downloading the mime types file and pointing and ENV var at it seems unnecessary for all applications. Would it make more sense to have the gem warn if it can not automatically download the file on install or if the file does not exist? Then raise a runtime error if the file does not exist when mimemagic is called? |
When making these changes the decision was made to have a build time error, rather than a runtime error. This was because we considered the risk to running applications of problems at build time was much lower than the potential for unexpected runtime errors in production systems, potentially weeks after a deployment. |
Bundle update with appropriate dependencies:
Have tried all versions. 3.6 worked and then before our deploy, it was yanked.
Error...
Installing mimemagic 0.3.8 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
Could not find MIME type database in the following locations: ["/usr/local/share/mime/packages/freedesktop.org.xml", "/opt/homebrew/share/mime/packages/freedesktop.org.xml",
"/usr/share/mime/packages/freedesktop.org.xml"]
Ensure you have either installed the shared-mime-types package for your distribution, or
'obtain a version of freedesktop.org.xml and set FREEDESKTOP_MIME_TYPES_PATH to the location
of that file.
/Users/bob/.rvm/gems/ruby-2.6.5@abaqis/gems/mimemagic-0.3.8/ext/mimemagic/Rakefile:14:in
locate_mime_database' /Users/bob/.rvm/gems/ruby-2.6.5@abaqis/gems/mimemagic-0.3.8/ext/mimemagic/Rakefile:25:in
block in <top (required)>'/Users/bob/.rvm/gems/ruby-2.6.5@abaqis/gems/rake-13.0.3/exe/rake:27:in `
Tasks: TOP => default
(See full trace by running task with --trace)
rake failed, exit code 1
Gem files will remain installed in /Users/bob/.rvm/gems/ruby-2.6.5@abaqis/gems/mimemagic-0.3.8 for inspection.
Results logged to /Users/bob/.rvm/gems/ruby-2.6.5@abaqis/extensions/x86_64-darwin-19/2.6.0/mimemagic-0.3.8/gem_make.out
An error occurred while installing mimemagic (0.3.8), and Bundler cannot continue.
Make sure that
gem install mimemagic -v '0.3.8' --source 'https://rubygems.org/'
succeeds before bundling.The text was updated successfully, but these errors were encountered: