How to Solve ruby rails Install Error [Windows]

Fetching mimemagic 0.3.10
Installing mimemagic 0.3.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/Ruby26/lib/ruby/gems/2.6.0/gems/mimemagic-0.3.10/ext/mimemagic
C:/Ruby26/bin/ruby.exe -rrubygems
C:/Ruby26/lib/ruby/gems/2.6.0/gems/rake-13.0.6/exe/rake
RUBYARCHDIR\=C:/Ruby26/lib/ruby/gems/2.6.0/extensions/x86-mingw32/2.6.0/mimemagic-0.3.10    
RUBYLIBDIR\=C:/Ruby26/lib/ruby/gems/2.6.0/extensions/x86-mingw32/2.6.0/mimemagic-0.3.10     
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.

This gem might be installed as a dependency of some bigger package, such as
rails, activestorage,
axlsx or cucumber. While most of these packages use the functionality of this
gem, some gems have
included this gem by accident. Set USE_FREEDESKTOP_PLACEHOLDER=true if you are
certain that you
do not need this gem, and wish to skip the inclusion of freedesktop.org.xml.

For this problem, just create a new freedesktop.org.xml file with the following contents, and then create a new name FREEDESKTOP_MIME_TYPES_PATH in the windows environment variable, pointing to this file, including the directory name and file name.

Read More: