samedi 17 juillet 2021

I can't execute rspec using 'bundle exec rspec'

I'm very new to coding and I have been learning ruby through the app academy open bootcamp. I have gotten to the Rspec topic, but after installing the gems from the gem file provided in the course:

source "https://rubygems.org"

gem "byebug"
gem "rspec", "~> 3.2.0"

The next step was to run Rspec using bundle exec rspec and I keep getting this error

from C:/Users/USER/Desktop/App Academy/rspec_demo/spec/add_spec.rb:1:in `require'
        from C:/Users/USER/Desktop/App Academy/rspec_demo/spec/add_spec.rb:1:in `<top (required)>'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `load'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `each'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:97:in `setup'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:85:in `run'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:70:in `run'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:38:in `invoke'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rspec-core-3.2.3/exe/rspec:4:in `<top (required)>'
        from C:/Ruby30-x64/bin/rspec:23:in `load'
        from C:/Ruby30-x64/bin/rspec:23:in `<main>'

I'm using windows 10 ruby version 3.0.2p107 (2021-07-07 revision 0db68f0233) rails version 6.1.4 gem version 3.2.22

I have tried uninstalling then reinstalling ruby on rails, and reinstalling the gem files. I have tried Googling the solution but I can not find a single solution for my specific problem. Any help will be appreciated!

Aucun commentaire:

Enregistrer un commentaire