Rails Tutorial完走後、自己理解をより深めることを目的にsample_appをベースにした自分なりのアプリケーションを作成しようと思い、再度ターミナルからrails new ...コマンドを実行したところ、エラーが発生してしまいます。
環境
・M1チップ搭載 MACBOOK AIR使用。
・ruby -v ⇨ ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [arm64-darwin20]
・brew -v ⇨ Homebrew 3.2.16
・rbenv -v ⇨ rbenv 1.2.0
・which ruby ⇨ /Users/name/.rbenv/shims/ruby
・which brew ⇨ /opt/homebrew/bin/brew
・which rails ⇨ /Users/name/.rbenv/shims/rails
エラー内容
ERRORLOG
1name@nameMacBook-Air environment % rails new my_app 2 create 3 create README.md 4 create Rakefile 5 create .ruby-version 6 create config.ru 7 create .gitignore 8 create .gitattributes 9 create Gemfile 10 run git init from "." 11hint: Using 'master' as the name for the initial branch. This default branch name 12hint: is subject to change. To configure the initial branch name to use in all 13hint: of your new repositories, which will suppress this warning, call: 14hint: 15hint: git config --global init.defaultBranch <name> 16hint: 17hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and 18hint: 'development'. The just-created branch can be renamed via this command: 19hint: 20hint: git branch -m <name> 21Initialized empty Git repository in /Users/name/environment/my_app/.git/ 22 create package.json 23 ・ 24 ・ 25 ・ 26 create tmp/storage/.keep 27 remove config/initializers/cors.rb 28 remove config/initializers/new_framework_defaults_6_1.rb 29 run bundle install 30Fetching gem metadata from https://rubygems.org/............ 31Fetching gem metadata from https://rubygems.org/. 32Resolving dependencies... 33Using rake 13.0.6 34Using concurrent-ruby 1.1.9 35Using i18n 1.8.10 36Using minitest 5.14.4 37Using tzinfo 2.0.4 38Using zeitwerk 2.4.2 39Using activesupport 6.1.4.1 40Using builder 3.2.4 41Using erubi 1.10.0 42Using mini_portile2 2.6.1 43Using racc 1.5.2 44Using nokogiri 1.12.5 (arm64-darwin) 45Using rails-dom-testing 2.0.3 46Using crass 1.0.6 47Using loofah 2.12.0 48Using rails-html-sanitizer 1.4.2 49Using actionview 6.1.4.1 50Using rack 2.2.3 51Using rack-test 1.1.0 52Using actionpack 6.1.4.1 53Using nio4r 2.5.8 54Using websocket-extensions 0.1.5 55Using websocket-driver 0.7.5 56Using actioncable 6.1.4.1 57Using globalid 0.5.2 58Using activejob 6.1.4.1 59Using activemodel 6.1.4.1 60Using activerecord 6.1.4.1 61Using marcel 1.0.2 62Using mini_mime 1.1.2 63Using activestorage 6.1.4.1 64Using mail 2.7.1 65Using actionmailbox 6.1.4.1 66Using actionmailer 6.1.4.1 67Using actiontext 6.1.4.1 68Using public_suffix 4.0.6 69Using addressable 2.8.0 70Using bindex 0.8.1 71Using msgpack 1.4.2 72Using bootsnap 1.9.1 73Using bundler 2.1.4 74Using byebug 11.1.3 75Using regexp_parser 2.1.1 76Using xpath 3.2.0 77Using capybara 3.35.3 78Using childprocess 4.1.0 79Using ffi 1.15.4 80Using jbuilder 2.11.2 81Using rb-fsevent 0.11.0 82Using rb-inotify 0.10.1 83Using listen 3.7.0 84Using method_source 1.0.0 85Using puma 5.5.2 86Using rack-mini-profiler 2.3.3 87Using rack-proxy 0.7.0 88Using thor 1.1.0 89Using railties 6.1.4.1 90Using sprockets 4.0.2 91Using sprockets-rails 3.2.2 92Using rails 6.1.4.1 93Using rexml 3.2.5 94Using rubyzip 1.3.0 95Using sassc 2.4.0 96Using tilt 2.0.10 97Using sassc-rails 2.1.2 98Using sass-rails 6.0.0 99Using selenium-webdriver 4.0.0 100Using semantic_range 3.0.0 101Using spring 3.0.0 102Using sqlite3 1.4.2 103Using turbolinks-source 5.2.0 104Using turbolinks 5.2.1 105Using web-console 4.1.0 106Using webdrivers 2.4.0 107Using webpacker 5.4.3 108Bundle complete! 17 Gemfile dependencies, 75 gems now installed. 109Use `bundle info [gemname]` to see where a bundled gem is installed. 110 run bundle binstubs bundler 111 rails webpacker:install 112Traceback (most recent call last): 113 33: from bin/rails:2:in `<main>' 114 32: from bin/rails:2:in `load' 115 31: from /Users/name/environment/my_app/bin/spring:7:in `<top (required)>' 116 30: from /Users/name/environment/my_app/bin/spring:7:in `tap' 117 29: from /Users/name/environment/my_app/bin/spring:10:in `block in <top (required)>' 118 28: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require' 119 27: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require' 120 26: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-3.0.0/lib/spring/binstub.rb:11:in `<top (required)>' 121 25: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-3.0.0/lib/spring/binstub.rb:11:in `load' 122 24: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-3.0.0/bin/spring:49:in `<top (required)>' 123 23: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-3.0.0/lib/spring/client.rb:30:in `run' 124 22: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-3.0.0/lib/spring/client/command.rb:7:in `call' 125 21: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-3.0.0/lib/spring/client/rails.rb:28:in `call' 126 20: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/spring-3.0.0/lib/spring/client/rails.rb:28:in `load' 127 19: from /Users/name/environment/my_app/bin/rails:4:in `<top (required)>' 128 18: from /Users/name/environment/my_app/bin/rails:4:in `require_relative' 129 17: from /Users/name/environment/my_app/config/boot.rb:4:in `<top (required)>' 130 16: from /Users/name/environment/my_app/config/boot.rb:4:in `require' 131 15: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/setup.rb:4:in `<top (required)>' 132 14: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap.rb:112:in `default_setup' 133 13: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap.rb:70:in `setup' 134 12: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/compile_cache.rb:10:in `setup' 135 11: from /Users/name.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `require_relative' 136 10: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' 137 9: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' 138 8: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 139 7: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' 140 6: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' 141 5: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/compile_cache/iseq.rb:2:in `<top (required)>' 142 4: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' 143 3: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' 144 2: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 145 1: from /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' 146/Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': dlopen(/Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/bootsnap.bundle, 9): no suitable image found. Did find: (LoadError) 147 /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/bootsnap.bundle: mach-o, but wrong architecture 148 /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/bootsnap.bundle: stat() failed with errno=25 - /Users/name/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/bootsnap.bundle
何やらgemについて突っ込まれているような気がするのですが、どうにも解決方法がわかりません。
どなたかご教示頂けないでしょうか…
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。