Skip to content

unable to run tests: "Could not locate Gemfile or .bundle/ directory" #123

Description

@ldeveber

Your environment

  • vscode-ruby-test-adapter version:
  • Ruby version: asdf managed (3.2.2)
  • VS Code version: 1.80.2
  • Operating System: MacOS 13.4.1 (Ventura)
  • RSpec or Minitest version: rspec 3.12.0

Expected behavior

running tests

Actual behavior

fails before running with

[error] Command failed: bundle exec rspec --pattern './[redacted]/spec//**/*_test.rb,./[redacted]/spec//**/test_*.rb,./[redacted]/spec//**/*_spec.rb' --require /Users/[redacted]/.vscode/extensions/connorshea.vscode-ruby-test-adapter-0.9.2/custom_formatter.rb --format CustomFormatter --order defined --dry-run
Could not locate Gemfile or .bundle/ directory
: Error: Command failed: bundle exec rspec --pattern './[redacted]/spec//**/*_test.rb,./[redacted]/spec//**/test_*.rb,./[redacted]/spec//**/*_spec.rb' --require /Users/[redacted]/.vscode/extensions/connorshea.vscode-ruby-test-adapter-0.9.2/custom_formatter.rb --format CustomFormatter --order defined --dry-run
Could not locate Gemfile or .bundle/ directory

	at ChildProcess.exithandler (node:child_process:409:12)
	at ChildProcess.emit (node:events:513:28)
	at maybeClose (node:internal/child_process:1121:16)
	at Socket.<anonymous> (node:internal/child_process:479:11)
	at Socket.emit (node:events:513:28)
	at Pipe.<anonymous> (node:net:757:14)

This section should include any relevant screenshots, code samples, console output, etc. The more information we have to reproduce the better!

We are using asdf.

workspace config:

    "rubyTestExplorer.rspecDirectory": "./[redacted]/spec/",
    "rubyTestExplorer.testFramework": "rspec"

workspace structure:

  • root/
    • [redacted]/
      • spec/
      • Gemfile
    • other stuff
    • .tool-versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions