RSpec - An error occurred while loading - Did you mean?

Viewed 4474

I want to start with TDD, but I am having this error, I am working with rvm - ruby 3.0.0 and rails 6.1.1

An error occurred while loading ./spec/models/user_spec.rb. - Did you mean?
                rspec ./spec/spec_helper.rb

Failure/Error: require File.expand_path('../config/environment', __dir__)

LoadError:
  cannot load such file -- rexml/document
 /home/manci/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:34:in `require'
 /home/manci/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `block in require'
 /home/manci/.rvm/gems/ruby-3.0.0/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `require'
 /home/manci/.rvm/gems/ruby-3.0.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox.rb:22:in `<main>'
 /home/manci/.rvm/gems/ruby-3.0.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'

How to solve this issue?

2 Answers
Related