Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

294
Views
El error de Rails no puede encontrar freedesktop.org.xml

Tuve algunos problemas al iniciar un nuevo proyecto RAILS, donde recibo un error de que falta un archivo /usr/local/share/mime/packages/freedesktop.org.xml . Hubo una conexión con las dependencias de mimemagic, y encontré este problema en GitHub sobre la versión y la licencia de mimemagic: https://github.com/rails/rails/issues/41750

Me pregunto si alguien más se encontró con el problema y podría explicar qué está pasando.

Estoy usando rbenv con la versión Ruby: 3.0.0p0 (2020-12-25 revisión 95aff21468) [x86_64-darwin19] y Rails 6.1.3

Aquí está el mensaje de error en la línea de comando:

 Installing railties 6.1.3 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/nico/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/mimemagic-0.3.7/ext/mimemagic /Users/nico/.rbenv/versions/3.0.0/bin/ruby -I/Users/nico/.rbenv/versions/3.0.0/lib/ruby/3.0.0 -rrubygems /Users/nico/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rake-13.0.3/exe/rake RUBYARCHDIR\=/Users/nico/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-19/3.0.0/mimemagic-0.3.7 RUBYLIBDIR\=/Users/nico/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/extensions/x86_64-darwin-19/3.0.0/mimemagic-0.3.7 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", "/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. Tasks: TOP => default (See full trace by running task with --trace) rake failed, exit code 1

gracias

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Encontré algunos enlaces a shared-mime-info en el enlace de GitHub que publiqué, y resolví el problema ejecutando el siguiente comando e iniciando un nuevo proyecto:

 brew install shared-mime-info
over 4 years ago · Santiago Trujillo Report

0

Si está en el sistema operativo ubuntu, puede ejecutar el siguiente comando

sudo apt-get install shared-mime-info

over 4 years ago · Santiago Trujillo Report

0

Si migra datos de una Mac Intel (o una Mac M1 con Rosetta 2) a una M1, tenga en cuenta que mimemagic almacenará en caché el directorio anterior, por lo que además de brew install shared-mime-info , querrá ejecutar:

 gem uninstall mimemagic gem install mimemagic
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!