diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index 42f6607860a..5f9aabcbf04 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -130,8 +130,8 @@ def generate_bundler_executable_stubs(spec, options = {}) if spec.executables.empty? options = {} spec.dependencies.each do |dep| - bins = Bundler.definition.specs[dep].first.executables - options[dep.name] = bins unless bins.empty? + bins = Bundler.definition.specs[dep].first.executables unless Bundler.definition.specs[dep].empty? + options[dep.name] = bins unless bins.nil? || bins.empty? end if options.any? Bundler.ui.warn "#{spec.name} has no executables, but you may want " +