Unable to install Rails 6.0.2.1 (or mimemagic)

Viewed 24

Currently trying to install Rails 6.0.2.1 (Rails 7.0.3.1 installed without problem), but my system won't let me. I have installed the shared-mime-info gem, but cannot install the mimemagic gem, which results in an error similar to the one below. Advice appreciated.

PS C:\Windows\System32\WindowsPowerShell\v1.0> gem install mimemagic
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing mimemagic:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mimemagic-0.4.3/ext/mimemagic
C:/Ruby31-x64/bin/ruby.exe -IC:/Ruby31-x64/lib/ruby/3.1.0 -rrubygems C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rake-13.0.6/exe/rake RUBYARCHDIR\=C:/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/mimemagic-0.4.3 RUBYLIBDIR\=C:/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/mimemagic-0.4.3
rake aborted!
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", "/opt/local/share/mime/packages/freedesktop.org.xml", "/usr/share/mime/packages/freedesktop.org.xml"]

Ensure you have either installed the shared-mime-info package for your distribution, or
obtain a version of freedesktop.org.xml and set FREEDESKTOP_MIME_TYPES_PATH to the location
of that file.

Tasks: TOP => default
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/mimemagic-0.4.3 for inspection.
Results logged to C:/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/mimemagic-0.4.3/gem_make.out
0 Answers
Related