debug
debug copied to clipboard
Having to specify bundle exec twice
I'm trying to run
rdbg -c -- bundle exec rspec <Path to rspec file>
but I keep getting this error
bundler: failed to load command: rspec
Prepending bundle exec to your command may solve this. (Gem::LoadError)
The weird thing is that when I enter the following command it works
rdbg -c -- bundle exec bundle exec rspec <Path to rspec file>
Any insight is appreciated!
Does bundle exec rspec ... on it's own work, outside of rdbg?
Is debug part of your Gemfile?
bundle exec rspec
I make
# Gemfile
source "https://rubygems.org"
gem 'rspec'
gem 'debug'
# spec/foo_spec.rb
RSpec.describe 'foo' do
it 'foo' do
expect(1+1).to eq 2
end
end
and run
$ bundle install
Bundle complete! 2 Gemfile dependencies, 15 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$ bundle exec rspec
.
Finished in 0.00107 seconds (files took 0.03907 seconds to load)
1 example, 0 failures
$ rdbg -c bundle exec rspec
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
rdoc (>= 4.0.0)
Available/installed versions of this gem:
- 6.9.1
- 6.6.3.1
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
[4, 13] in ~/.rbenv/versions/3.3.1/bin/rspec
4| #
5| # The application 'rspec-core' is installed as part of a gem, and
6| # this file is here to facilitate running it.
7| #
8|
=> 9| require 'rubygems'
10|
11| Gem.use_gemdeps
12|
13| version = ">= 0.a"
=>#0 <top (required)> at ~/.rbenv/versions/3.3.1/bin/rspec:9
#1 [C] Kernel.load at ~/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundler/cli/exec.rb:58
# and 14 frames (use `bt' command for all frames)
(rdbg) c # continue command
.
Finished in 0.00171 seconds (files took 0.05692 seconds to load)
1 example, 0 failures
but I can't repro. Any other steps?