前提・実現したいこと
Railsのインストールができないです。
結構ハマってしまっているので何かわかることがあれば教えてください。
手順は以下の記事を参考にしました。
https://qiita.com/kodai_0122/items/56168eaec28eb7b1b93b
macOS Big Sur 11.2.3
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin20]
Bundler version 2.2.17
rbenv versions * 2.7.0
発生している問題・エラーメッセージ
$ gem install rails -v 6.0.3 Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. current directory: /Users/r/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mimemagic-0.3.10/ext/mimemagic /Users/r/.rbenv/versions/2.7.0/bin/ruby -I/Users/r/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems -rrubygems /Users/r/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/rake-13.0.3/exe/rake RUBYARCHDIR\=/Users/r/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-20/2.7.0/mimemagic-0.3.10 RUBYLIBDIR\=/Users/r/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-20/2.7.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. The FREEDESKTOP_PLACEHOLDER option is meant as a transitional feature, and will be deprecated in the next release. Tasks: TOP => default (See full trace by running task with --trace) rake failed, exit code 1 Gem files will remain installed in /Users/r/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/mimemagic-0.3.10 for inspection. Results logged to /Users/r/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-20/2.7.0/mimemagic-0.3.10/gem_make.out
疑問
gem listを見ると
railties (6.1.3.2)
が入ってます。
https://qiita.com/AKI3/items/e89d86889a34794a0d5f
を参考に消そうとしたのですが、できませんでした。
他に何をみていけば良いのかもわからなくなってしまっています。
何か原因を特定する方法など教えて欲しいです。
よろしくお願いします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/05/10 15:07