Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ldeveber opened this issue Jul 31, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@ldeveber
Copy link

ldeveber commented Jul 31, 2023

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
@ldeveber ldeveber added the bug Something isn't working label Jul 31, 2023
katz added a commit to katz/study-rails8 that referenced this issue Jan 26, 2025
Workspace化しないと拡張機能側の問題でテストが見つけられない
connorshea/vscode-ruby-test-adapter#123
katz added a commit to katz/study-rails8 that referenced this issue Jan 28, 2025
Workspace化しないと拡張機能側の問題でテストが見つけられない
connorshea/vscode-ruby-test-adapter#123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant