Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.93k stars 10.72k forks source link

$ brew cask upgrade Error: Cask 'jenkins' is unreadable: undefined method `undent' for #<String:0x00000001031fce18> Did you mean “jenkins-menu”? #55721

Closed jpswade closed 5 years ago

jpswade commented 5 years ago

General troubleshooting steps

Description of issue

When I attempt to upgrade the casks, I get the following error:

$ brew cask upgrade
Error: Cask 'jenkins' is unreadable: undefined method `undent' for #<String:0x0000000101287808> Did you mean “jenkins-menu”?

Command that failed

$ brew cask upgrade --force

Output of command with --force --verbose --debug

Error: Cask 'jenkins' is unreadable: undefined method `undent' for #<String:0x00000001022c95e0> Did you mean “jenkins-menu”?
/usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:53:in `rescue in casks'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:46:in `casks'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/upgrade.rb:15:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:34:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:89:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:155:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:120:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:160:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:160:in `rescue in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:143:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:120:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'

Output of brew cask doctor

==> Homebrew Version
1.8.4-25-gc89f6c8
==> macOS
10.14
==> SIP
Enabled
==> Java
1.8.0_131, 1.8.0_74, 1.8.0_65
==> Gatekeeper support
Enabled
==> Homebrew Cask Install Location
<NONE>
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (4070 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions (209 casks)
/usr/local/Homebrew/Library/Taps/yleisradio/homebrew-terraforms (84 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/ruby-macho-2.1.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/rubocop-rspec-1.30.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/rubocop-0.60.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/unicode-display_width-1.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/ruby-progressbar-1.10.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/rainbow-3.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/powerpack-0.1.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/plist-3.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/parser-2.5.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/parallel-1.12.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/jaro_winkler-1.5.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/extensions/universal-darwin-18/2.3.0/jaro_winkler-1.5.1
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/backports-3.11.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/ast-2.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/activesupport-5.2.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/tzinfo-1.2.5/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/thread_safe-0.3.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/minitest-5.11.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/i18n-1.1.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/concurrent-ruby-1.0.5/lib
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin"
SHELL="/bin/bash"

Output of brew tap

$ brew tap
eugenmayer/dockersync
git-time-metric/gtm
homebrew/cask
homebrew/cask-versions
homebrew/core
homebrew/php
homebrew/services
homebrew/versions
yleisradio/terraforms
vitorgalvao commented 5 years ago

Assuming you installed jenkins from us and not one of the other taps, it has been removed. It’s now a formula, and not a Cask. Do:

brew cask uninstall --force jenkins
rm -r "$(brew --prefix)/Caskroom/jenkins"
brew install jenkins

The second command is there in case the first one fails. So if one of them fails, do not worry.