ruby/rubygems · error · ArgumentError

Unable to find gem dependencies file at #{path}

Error message

Unable to find gem dependencies file at #{path}

What it means

Error "Unable to find gem dependencies file at #{path}" thrown in ruby/rubygems.

Source

Thrown at lib/rubygems.rb:1196

    return unless path

    path = path.dup

    if path == "-"
      Gem::Util.traverse_parents Dir.pwd do |directory|
        dep_file = GEM_DEP_FILES.find {|f| File.file?(f) }

        next unless dep_file

        path = File.join directory, dep_file
        break
      end
    end

    unless File.file? path
      return unless raise_exception

      raise ArgumentError, "Unable to find gem dependencies file at #{path}"
    end

    ENV["BUNDLE_GEMFILE"] ||= File.expand_path(path)
    require_relative "rubygems/user_interaction"
    require "bundler"
    begin
      Gem::DefaultUserInteraction.use_ui(ui) do
        Bundler.ui.silence do
          @gemdeps = Bundler.setup
        end
      ensure
        Gem::DefaultUserInteraction.ui.close
      end
    rescue Bundler::BundlerError => e
      warn e.message
      warn "You may need to `bundle install` to install missing gems"
      warn ""
    end

View on GitHub (pinned to 86cbb817a3)

When it happens

Trigger: Thrown at lib/rubygems.rb:1196 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruby/rubygems@86cbb817a3 (2026-08-23). Data as JSON: /api/errors/589ffaf8a1110ce0. Report an issue: GitHub.