ruby-orb icon indicating copy to clipboard operation
ruby-orb copied to clipboard

cannot load such file -- /home/circleci/project after moving to 2.0.0

Open FrBenjamin opened this issue 1 year ago • 5 comments

Orb version:

2.0.0

What happened:

After moving from 1.4.0. to 2.0.0. I get the following error when RSpec is trying to run in the pipeline:

+ bundle exec rspec '' --profile 10 --format RspecJunitFormatter --out /tmp/test-results/rspec/results.xml --format progress --order defined An error occurred while loading .. Failure/Error: send(method, file) LoadError: cannot load such file -- /home/circleci/project

Not sure if connected but VS Code with the CircleCI plugin gives me the following warning:

Parameter pre-install-steps is required for ruby/install-deps However, according to https://circleci.com/developer/orbs/orb/circleci/ruby?version=2.0.0 this is not true.

Expected behavior:

RSpec should run same as before when using 1.4.0.

Additional Information:

Gem rspec_junit_formatter is used.

FrBenjamin avatar Mar 02 '23 05:03 FrBenjamin

Hi @FrBenjamin Please add one more spec file. It is because We are splitting just one file. Screenshot 2023-07-02 at 17 52 41

HungBNDev avatar Jul 02 '23 10:07 HungBNDev

Hey @HungBNDev! I am not exactly sure if that is what you mean but we have multiple RSpec test files (as in _spec.rb files) already.

FrBenjamin avatar Jul 20 '23 03:07 FrBenjamin

Hey @HungBNDev! I am not exactly sure if that is what you mean but we have multiple RSpec test files (as in _spec.rb files) already.

Ya, that is exactly what I mean, I got that trouble when try to run unit test with only 1 file. I think you may try console log the output files for running unit_test step. And investigate it. 😄 Have a good day.

HungBNDev avatar Aug 05 '23 07:08 HungBNDev

@FrBenjamin Did the solution proposed solved the issue? Please tell me if this is still an issue, if so, I would need more details about what you are doing.

marboledacci avatar Sep 25 '24 20:09 marboledacci

Hey @HungBNDev! I am not exactly sure if that is what you mean but we have multiple RSpec test files (as in _spec.rb files) already.

@FrBenjamin Try to use command: bundle exec rspec instead of use orb. I guess you may did not install rspec_junit_formatter in Gemfile.

HungBNDev avatar Sep 26 '24 06:09 HungBNDev