@ayasaka

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

rake aboutedとエラーがでてしまう

解決したいこと

ここに解決したい内容を記載してください。
Ruby on RailsでRuby on Railsチュートリアルのようなwebアプリを作っています。

発生している問題・エラー

エラー:[rake --prereqs] rake aborted!
LoadError: cannot load such file -- rexml/document
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `block in require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox.rb:22:in `<main>'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `block in require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/webdrivers-4.6.1/lib/webdrivers/geckodriver.rb:72:in `<main>'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `block in require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/webdrivers-4.6.1/lib/webdrivers.rb:4:in `<main>'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/bundler/runtime.rb:60:in `block (2 levels) in require'
C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/bundler/runtime.rb:55:in `each'
C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/bundler/runtime.rb:55:in `block in require'
C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/bundler/runtime.rb:44:in `each'
C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/bundler/runtime.rb:44:in `require'
C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/bundler.rb:174:in `require'
C:/Users/j9137qws/RubymineProjects/sample_app/enviroment/sample_app/config/application.rb:7:in `<main>'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `require_relative'
C:/Users/j9137qws/RubymineProjects/sample_app/enviroment/sample_app/Rakefile:4:in `<main>'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:710:in `raw_load_rakefile'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:82:in `block in run'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
C:/Users/j9137qws/RubymineProjects/sample_app/enviroment/sample_app/bin/rake:5:in `<main>'

該当するソースコード

Ruby on Rails

#!/usr/bin/env ruby
load File.expand_path("spring", __dir__)
require_relative "../config/boot"
require "rake"
Rake.application.run

自分で試したこと

ここに問題・エラーに対して試したことを記載してください。
https://qiita.com/momomo0318/items/ee4356bebd5eaa2b6d91
を参考にしたが、エラー内容がちがっていてわかりません。

0 likes

1Answer

エラーの内容を表すのは2行目の LoadError: cannot load such file -- rexml/document です。これで検索すると解決策が出てきます。

0Like

Comments

  1. @ayasaka

    Questioner

    ありがとうございます。検索してみます

Your answer might help someone💌