ruby/rubygems · error · ArgumentError
no gemspecs found at #{Dir.pwd}
Error message
no gemspecs found at #{Dir.pwd} What it means
Error "no gemspecs found at #{Dir.pwd}" thrown in ruby/rubygems.
Source
Thrown at lib/rubygems/request_set/gem_dependency_api.rb:262
##
# Finds a gemspec with the given +name+ that lives at +path+.
def find_gemspec(name, path) # :nodoc:
glob = File.join path, "#{name}.gemspec"
spec_files = Dir[glob]
case spec_files.length
when 1 then
spec_file = spec_files.first
spec = Gem::Specification.load spec_file
return spec if spec
raise ArgumentError, "invalid gemspec #{spec_file}"
when 0 then
raise ArgumentError, "no gemspecs found at #{Dir.pwd}"
else
raise ArgumentError,
"found multiple gemspecs at #{Dir.pwd}, " \
"use the name: option to specify the one you want"
end
end
##
# Changes the behavior of gem dependency file loading to installing mode.
# In installing mode certain restrictions are ignored such as ruby version
# mismatch checks.
def installing=(installing) # :nodoc:
@installing = installing
end
##
# Loads the gem dependency file and returns self.View on GitHub (pinned to 86cbb817a3)
Solutions
- Run the command in a directory containing a .gemspec file
- Pass an explicit gemspec path if it lives elsewhere
When it happens
Trigger: Thrown at lib/rubygems/request_set/gem_dependency_api.rb:262 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/fe70be44588bd214.
Report an issue: GitHub.