以前までエラーが出なかったのですが、minitest/autorun
をロードするときにエラーがでるようになりました。
mini.rb
1require 'minitest/autorun'
このコードを実行すると、次のエラーになりました。
$ ruby mini.rb Traceback (most recent call last): 9: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:68:in `block in autorun' 8: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:126:in `run' 7: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:97:in `load_plugins' 6: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:97:in `each' 5: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:103:in `block in load_plugins' 4: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' 3: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' 2: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/railties-6.0.3.4/lib/minitest/rails_plugin.rb:4:in `<top (required)>' 1: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- rails/test_unit/reporter (LoadError) 12: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:68:in `block in autorun' 11: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:126:in `run' 10: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:97:in `load_plugins' 9: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:97:in `each' 8: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:103:in `block in load_plugins' 7: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' 6: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' 5: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/railties-6.0.3.4/lib/minitest/rails_plugin.rb:4:in `<top (required)>' 4: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:156:in `require' 3: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:161:in `rescue in require' 2: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems.rb:209:in `try_activate' 1: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/specification.rb:1371:in `activate' /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/specification.rb:2243:in `raise_if_conflicts': Unable to activate railties-6.0.3.4, because activesupport-6.1.0 conflicts with activesupport (= 6.0.3.4) (Gem::ConflictError) 13: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:68:in `block in autorun' 12: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:126:in `run' 11: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:97:in `load_plugins' 10: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:97:in `each' 9: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.2/lib/minitest.rb:103:in `block in load_plugins' 8: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' 7: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' 6: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/railties-6.0.3.4/lib/minitest/rails_plugin.rb:4:in `<top (required)>' 5: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:156:in `require' 4: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:161:in `rescue in require' 3: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems.rb:208:in `try_activate' 2: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems.rb:215:in `rescue in try_activate' 1: from /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/specification.rb:1371:in `activate' /Users/shisha/.rbenv/versions/2.7.1/lib/ruby/2.7.0/rubygems/specification.rb:2243:in `raise_if_conflicts': Unable to activate railties-6.0.3.4, because activesupport-6.1.0 conflicts with activesupport (= 6.0.3.4) (Gem::ConflictError)
このファイルを実行したディレクトリ自体は、Railsと関係ないはずなのにエラーにRailsと表示されて不思議な感じです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。