debug: 1.6.3 fails to install deps with ruby 3.1.3

Your environment

  • ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-darwin22] and ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]
  • rdbg -v: rdbg 1.6.3 and rdbg 1.6.2
  • bundler --version: Bundler version 2.3.21

Describe the bug when debug-1.6.3 is installed with ruby-3.1.3 it leaves out all of its deps

To Reproduce given this:

Gemfile:

source 'https://rubygems.org'
gem 'debug'

.ruby-version

3.1.2

Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    debug (1.6.3)
      irb (>= 1.3.6)
      reline (>= 0.3.1)
    io-console (0.5.11)
    irb (1.5.1)
      reline (>= 0.3.0)
    reline (0.3.1)
      io-console (~> 0.5)

PLATFORMS
  x86_64-darwin-21
  x86_64-darwin-22

DEPENDENCIES
  debug

BUNDLED WITH
   2.3.21

when i change .ruby-version to 3.1.3 and run bundle update all of the debug deps are removed:

diff --git a/Gemfile.lock b/Gemfile.lock
index 856ddda..01c43e4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -2,13 +2,6 @@ GEM
   remote: https://rubygems.org/
   specs:
     debug (1.6.3)
-      irb (>= 1.3.6)
-      reline (>= 0.3.1)
-    io-console (0.5.11)
-    irb (1.5.1)
-      reline (>= 0.3.0)
-    reline (0.3.1)
-      io-console (~> 0.5)

this then causes issues:

Downloading debug-1.6.3 revealed dependencies not in the API or the lockfile                                                                   
(irb (>= 1.3.6), reline (>= 0.3.1)).                                                                                                                                      
Either installing with `--full-index` or running `bundle update debug` should                                                                                             
fix the problem.                              

and neither of the solutions mentioned solved the problem.
Expected behavior this shouldn’t happen

Additional context verified on macos and linux

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 8
  • Comments: 19 (2 by maintainers)

Commits related to this issue

Most upvoted comments

For anyone encountering this issue again on 3.2.1 and Bundler 2.4.7, I’m also experiencing it in GitHub actions:

Downloading debug-1.7.1 revealed dependencies not in the API or the lockfile (irb (>= 1.5.0), reline (>= 0.3.1)). Either installing with --full-index or running bundle update debug should fix the problem.

When I look on disk, the built-in debug-1.7.1.gemspec indeed declares no runtime dependencies and as a result my Gemfile.lock also resolved no transitive dependencies on irb or reline:

    # …
    date (3.3.3)
    debug (1.7.1)
    discard (1.2.1)
      activerecord (>= 4.2, < 8)
    # …

@deivid-rodriguez’s workaround from https://github.com/rubygems/rubygems/issues/6082 still works, though:

  1. Run gem install debug to fix the incorrect gemspec on disk
  2. Comment out gem "debug" in the Gemfile
  3. bundle install will remove it from the lockfile
  4. Uncomment gem "debug"
  5. bundle install will add the transitive deps to the lockfile
     date (3.3.3)
     debug (1.7.1)
+      irb (>= 1.5.0)
+      reline (>= 0.3.1)
     i18n (1.12.0)
       concurrent-ruby (~> 1.0)
+    io-console (0.6.0)
+    irb (1.6.2)
+      reline (>= 0.3.0)
     rake (13.0.6)
     regexp_parser (2.7.0)
+    reline (0.3.2)
+      io-console (~> 0.5)
     request_store (1.5.1)

This was the fewest steps I could figure out to get things working again.

I’m currently seeing this on 1.7.1 with Ruby 3.2.0 and Bundler 2.3.5

https://github.com/sudara/alonetone/actions/runs/3839336156/jobs/6536959125

Same happening to me on 3.2.1. I thought it was fixed with https://github.com/rubygems/rubygems/issues/6082 but it came back.

The way I fixed it was to comment out gem "debug" from Gemfile, then bundle, then gem install debug, then uncommenting and one last bundle.

For me, 1.7.1 fails (same way, inside CI pipeline, release version of ruby 3.2.0) even if I mention missing gems in Gemfile. 1.7.0 seems to work.

I am running into this same problem. Interestingly, everything works fine locally. However, when I try to bundle inside of a github action, I get the problem.

Seems like version 1.7.0 of debug works fine so I have had to pin it to that version to work

I had the same issue. I do not think it is related to the version itself but more of an issue on resolving between how irb and reline are installed (native gem VS gem handled by Gemfile).

$ gem uninstall debug irb reline

Clean mentions of “irb” and “reline” in Gemfile.lock. You should have only “debug (1.7.1)” line.

$ bundle update debug

Check Gemfile.lock. You should see a proper output:

    debug (1.7.1)
      irb (>= 1.5.0)
      reline (>= 0.3.1)