ターミナルで下記を入力しRailsインストールを試みたものの
インストールされません。
$ gem install rails -v "5.2.4.1"
実行すると、
Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. current directory: /Users/Ippei/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/mimemagic-0.3.10/ext/mimemagic /Users/Ippei/.rbenv/versions/2.6.7/bin/ruby -rrubygems /Users/Ippei/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/rake-13.0.3/exe/rake RUBYARCHDIR\=/Users/Ippei/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-19/2.6.0/mimemagic-0.3.10 RUBYLIBDIR\=/Users/Ippei/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-19/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. 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/Ippei/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/mimemagic-0.3.10 for inspection. Results logged to /Users/Ippei/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-19/2.6.0/mimemagic-0.3.10/gem_make.out
結果
rails -v Rails is not currently installed on this system. To get the latest version, simply type: $ sudo gem install rails You can then rerun your "rails" command.
となります。
使用PC
mac OS Catalina ver 10.15.7
$ ruby -v
ruby 2.6.7p197 (2021-04-05 revision 67941) [x86_64-darwin19]
$ brew -v
Homebrew 3.0.11
Homebrew/homebrew-core (git revision be94b77f55; last commit 2021-04-07)
$ rbenv -v
rbenv 1.1.2
$ gem install rails -v "5.2.4.1"
初心者で、開発環境構築でつまずいてしまいました。
ご教授の程、よろしくお願い申し上げます。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/04/08 08:10