diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 22ac0137fd3bb8..56e88045b2c67b 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -1050,12 +1050,12 @@ def install_default_gem(dir, srcdir, bindir) # This gemspec keep the original dependencies path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec" unless File.exist?(path) - # Try to find the gemspec file for gems that hasn't own gemspec - path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec" - unless File.exist?(path) - skipped[gem_name] = "gemspec not found" - next - end + # Try to find the gemspec file for gems that hasn't own gemspec + path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec" + unless File.exist?(path) + skipped[gem_name] = "gemspec not found" + next + end end end spec = load_gemspec(path, "#{srcdir}/.bundle/gems/#{gem_name}")