# File lib/bundler/cli.rb, line 425 def open(name) editor = [ENV['BUNDLER_EDITOR'], ENV['VISUAL'], ENV['EDITOR']].find{|e| !e.nil? && !e.empty? } if editor gem_path = locate_gem(name) Dir.chdir(gem_path) do command = "#{editor} #{gem_path}" success = system(command) Bundler.ui.info "Could not run '#{command}'" unless success end else Bundler.ui.info("To open a bundled gem, set $EDITOR or $BUNDLER_EDITOR") end end