diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb index a00de692ea..ceb546f580 100644 --- a/lib/bundled_gems.rb +++ b/lib/bundled_gems.rb @@ -108,7 +108,9 @@ module Gem::BUNDLED_GEMS break end end - msg += " Also contact author of #{caller_gem} to add #{gem} into its gemspec." + if caller_gem + msg += " Also contact author of #{caller_gem} to add #{gem} into its gemspec." + end end else msg += " Install #{gem} from RubyGems."