質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.46%
Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

0回答

1241閲覧

railsでbunlde updateをするとnokogiriが追加され、rails sができなくなる

oeiqgfodgfhps

総合スコア35

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2021/12/22 02:32

お世話になっております。
現在railsのプロジェクトを立ち上げたのですが、rails sを行うとnot load such file -- nokogiri/nokogiri (LoadError) のエラーが出てしまいます。
arm64のnokogiriが悪さをしているらしいとのことで、Gemfile.lockからnokogiri (1.12.5-arm64-darwin)の記述を消去し、bundle installを行うと問題なくrails sは実行できたのですが、他のライブラリ追加の後にbunlde updateを行うと、Gemfile.locknokogiri (1.12.5-arm64-darwin)がまた追加され、rails sが失敗してしまいます。

bundle updateをするたびにGemfile.lockからnokogiri (1.12.5-arm64-darwin)を消すのは根本的な解決ではないような気がします。
この場合Gemfileをうまく書き直せばいいのでしょうか??

ご指導のほどよろしくお願いいたします。

Gemfile

1source 'https://rubygems.org' 2git_source(:github) { |repo| "https://github.com/#{repo}.git" } 3 4ruby '2.6.3' 5 6# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' 7gem 'rails', '~> 6.1.4', '>= 6.1.4.1' 8# Use sqlite3 as the database for Active Record 9# gem 'sqlite3', '~> 1.4' 10# Use mysql2 as the database for Active Record 11gem 'mysql2' 12# Use Puma as the app server 13gem 'puma', '~> 5.0' 14# Use SCSS for stylesheets 15gem 'sass-rails', '>= 6' 16# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker 17gem 'webpacker', '~> 5.0' 18# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 19gem 'turbolinks', '~> 5' 20# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 21gem 'jbuilder', '~> 2.7' 22# Use Redis adapter to run Action Cable in production 23# gem 'redis', '~> 4.0' 24# Use Active Model has_secure_password 25# gem 'bcrypt', '~> 3.1.7' 26 27# Use Active Storage variant 28# gem 'image_processing', '~> 1.2' 29 30# Reduces boot times through caching; required in config/boot.rb 31gem 'bootsnap', '>= 1.4.4', require: false 32 33group :development, :test do 34 # Call 'byebug' anywhere in the code to stop execution and get a debugger console 35 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 36end 37 38group :development do 39 # Access an interactive console on exception pages or by calling 'console' anywhere in the code. 40 gem 'web-console', '>= 4.1.0' 41 # Display performance information such as SQL time and flame graphs for each request in your browser. 42 # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md 43 gem 'rack-mini-profiler', '~> 2.0' 44 gem 'listen', '~> 3.3' 45 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 46 gem 'spring' 47end 48 49group :test do 50 # Adds support for Capybara system testing and selenium driver 51 gem 'capybara', '>= 3.26' 52 gem 'selenium-webdriver' 53 # Easy installation and use of web drivers to run system tests with browsers 54 gem 'webdrivers' 55end 56 57# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 58gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Gemfile.lock

1GEM 2 remote: https://rubygems.org/ 3 specs: 4 actioncable (6.1.4.4) 5 actionpack (= 6.1.4.4) 6 activesupport (= 6.1.4.4) 7 nio4r (~> 2.0) 8 websocket-driver (>= 0.6.1) 9 actionmailbox (6.1.4.4) 10 actionpack (= 6.1.4.4) 11 activejob (= 6.1.4.4) 12 activerecord (= 6.1.4.4) 13 activestorage (= 6.1.4.4) 14 activesupport (= 6.1.4.4) 15 mail (>= 2.7.1) 16 actionmailer (6.1.4.4) 17 actionpack (= 6.1.4.4) 18 actionview (= 6.1.4.4) 19 activejob (= 6.1.4.4) 20 activesupport (= 6.1.4.4) 21 mail (~> 2.5, >= 2.5.4) 22 rails-dom-testing (~> 2.0) 23 actionpack (6.1.4.4) 24 actionview (= 6.1.4.4) 25 activesupport (= 6.1.4.4) 26 rack (~> 2.0, >= 2.0.9) 27 rack-test (>= 0.6.3) 28 rails-dom-testing (~> 2.0) 29 rails-html-sanitizer (~> 1.0, >= 1.2.0) 30 actiontext (6.1.4.4) 31 actionpack (= 6.1.4.4) 32 activerecord (= 6.1.4.4) 33 activestorage (= 6.1.4.4) 34 activesupport (= 6.1.4.4) 35 nokogiri (>= 1.8.5) 36 actionview (6.1.4.4) 37 activesupport (= 6.1.4.4) 38 builder (~> 3.1) 39 erubi (~> 1.4) 40 rails-dom-testing (~> 2.0) 41 rails-html-sanitizer (~> 1.1, >= 1.2.0) 42 activejob (6.1.4.4) 43 activesupport (= 6.1.4.4) 44 globalid (>= 0.3.6) 45 activemodel (6.1.4.4) 46 activesupport (= 6.1.4.4) 47 activerecord (6.1.4.4) 48 activemodel (= 6.1.4.4) 49 activesupport (= 6.1.4.4) 50 activestorage (6.1.4.4) 51 actionpack (= 6.1.4.4) 52 activejob (= 6.1.4.4) 53 activerecord (= 6.1.4.4) 54 activesupport (= 6.1.4.4) 55 marcel (~> 1.0.0) 56 mini_mime (>= 1.1.0) 57 activesupport (6.1.4.4) 58 concurrent-ruby (~> 1.0, >= 1.0.2) 59 i18n (>= 1.6, < 2) 60 minitest (>= 5.1) 61 tzinfo (~> 2.0) 62 zeitwerk (~> 2.3) 63 addressable (2.8.0) 64 public_suffix (>= 2.0.2, < 5.0) 65 bindex (0.8.1) 66 bootsnap (1.9.3) 67 msgpack (~> 1.0) 68 builder (3.2.4) 69 byebug (11.1.3) 70 capybara (3.36.0) 71 addressable 72 matrix 73 mini_mime (>= 0.1.3) 74 nokogiri (~> 1.8) 75 rack (>= 1.6.0) 76 rack-test (>= 0.6.3) 77 regexp_parser (>= 1.5, < 3.0) 78 xpath (~> 3.2) 79 childprocess (4.1.0) 80 concurrent-ruby (1.1.9) 81 crass (1.0.6) 82 erubi (1.10.0) 83 ffi (1.15.4) 84 globalid (1.0.0) 85 activesupport (>= 5.0) 86 i18n (1.8.11) 87 concurrent-ruby (~> 1.0) 88 jbuilder (2.11.5) 89 actionview (>= 5.0.0) 90 activesupport (>= 5.0.0) 91 listen (3.7.0) 92 rb-fsevent (~> 0.10, >= 0.10.3) 93 rb-inotify (~> 0.9, >= 0.9.10) 94 loofah (2.13.0) 95 crass (~> 1.0.2) 96 nokogiri (>= 1.5.9) 97 mail (2.7.1) 98 mini_mime (>= 0.1.1) 99 marcel (1.0.2) 100 matrix (0.4.2) 101 method_source (1.0.0) 102 mini_mime (1.1.2) 103 minitest (5.15.0) 104 msgpack (1.4.2) 105 mysql2 (0.5.3) 106 nio4r (2.5.8) 107 nokogiri (1.12.5-arm64-darwin) 108 racc (~> 1.4) 109 nokogiri (1.12.5-x86_64-darwin) 110 racc (~> 1.4) 111 public_suffix (4.0.6) 112 puma (5.5.2) 113 nio4r (~> 2.0) 114 racc (1.6.0) 115 rack (2.2.3) 116 rack-mini-profiler (2.3.3) 117 rack (>= 1.2.0) 118 rack-proxy (0.7.0) 119 rack 120 rack-test (1.1.0) 121 rack (>= 1.0, < 3) 122 rails (6.1.4.4) 123 actioncable (= 6.1.4.4) 124 actionmailbox (= 6.1.4.4) 125 actionmailer (= 6.1.4.4) 126 actionpack (= 6.1.4.4) 127 actiontext (= 6.1.4.4) 128 actionview (= 6.1.4.4) 129 activejob (= 6.1.4.4) 130 activemodel (= 6.1.4.4) 131 activerecord (= 6.1.4.4) 132 activestorage (= 6.1.4.4) 133 activesupport (= 6.1.4.4) 134 bundler (>= 1.15.0) 135 railties (= 6.1.4.4) 136 sprockets-rails (>= 2.0.0) 137 rails-dom-testing (2.0.3) 138 activesupport (>= 4.2.0) 139 nokogiri (>= 1.6) 140 rails-html-sanitizer (1.4.2) 141 loofah (~> 2.3) 142 railties (6.1.4.4) 143 actionpack (= 6.1.4.4) 144 activesupport (= 6.1.4.4) 145 method_source 146 rake (>= 0.13) 147 thor (~> 1.0) 148 rake (13.0.6) 149 rb-fsevent (0.11.0) 150 rb-inotify (0.10.1) 151 ffi (~> 1.0) 152 regexp_parser (2.2.0) 153 rexml (3.2.5) 154 rubyzip (2.3.2) 155 sass-rails (6.0.0) 156 sassc-rails (~> 2.1, >= 2.1.1) 157 sassc (2.4.0) 158 ffi (~> 1.9) 159 sassc-rails (2.1.2) 160 railties (>= 4.0.0) 161 sassc (>= 2.0) 162 sprockets (> 3.0) 163 sprockets-rails 164 tilt 165 selenium-webdriver (4.1.0) 166 childprocess (>= 0.5, < 5.0) 167 rexml (~> 3.2, >= 3.2.5) 168 rubyzip (>= 1.2.2) 169 semantic_range (3.0.0) 170 spring (3.1.1) 171 sprockets (4.0.2) 172 concurrent-ruby (~> 1.0) 173 rack (> 1, < 3) 174 sprockets-rails (3.4.2) 175 actionpack (>= 5.2) 176 activesupport (>= 5.2) 177 sprockets (>= 3.0.0) 178 thor (1.1.0) 179 tilt (2.0.10) 180 turbolinks (5.2.1) 181 turbolinks-source (~> 5.2) 182 turbolinks-source (5.2.0) 183 tzinfo (2.0.4) 184 concurrent-ruby (~> 1.0) 185 web-console (4.2.0) 186 actionview (>= 6.0.0) 187 activemodel (>= 6.0.0) 188 bindex (>= 0.4.0) 189 railties (>= 6.0.0) 190 webdrivers (5.0.0) 191 nokogiri (~> 1.6) 192 rubyzip (>= 1.3.0) 193 selenium-webdriver (~> 4.0) 194 webpacker (5.4.3) 195 activesupport (>= 5.2) 196 rack-proxy (>= 0.6.1) 197 railties (>= 5.2) 198 semantic_range (>= 2.3.0) 199 websocket-driver (0.7.5) 200 websocket-extensions (>= 0.1.0) 201 websocket-extensions (0.1.5) 202 xpath (3.2.0) 203 nokogiri (~> 1.8) 204 zeitwerk (2.5.1) 205 206PLATFORMS 207 universal-darwin-20 208 209DEPENDENCIES 210 bootsnap (>= 1.4.4) 211 byebug 212 capybara (>= 3.26) 213 jbuilder (~> 2.7) 214 listen (~> 3.3) 215 mysql2 216 puma (~> 5.0) 217 rack-mini-profiler (~> 2.0) 218 rails (~> 6.1.4, >= 6.1.4.1) 219 sass-rails (>= 6) 220 selenium-webdriver 221 spring 222 turbolinks (~> 5) 223 tzinfo-data 224 web-console (>= 4.1.0) 225 webdrivers 226 webpacker (~> 5.0) 227 228RUBY VERSION 229 ruby 2.6.3p62 230 231BUNDLED WITH 232 2.3.0 233

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

winterboum

2021/12/22 03:47

bundle install はエラーなく終わっていますか?
oeiqgfodgfhps

2021/12/22 03:48

はい、bundle installやbundle updateはエラーなく終わっています。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.46%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問