CircleCI-Public / ruby-orb

The `circleci/ruby` orb source code.
https://circleci.com/developer/orbs/orb/circleci/ruby
MIT License
25 stars 53 forks source link

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

Open FrBenjamin opened 1 year ago

FrBenjamin commented 1 year ago

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.

HungBNDev commented 1 year ago

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
FrBenjamin commented 1 year ago

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.

HungBNDev commented 1 year ago

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.

marboledacci commented 1 week ago

@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.

HungBNDev commented 1 week ago

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.