Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: undefined method `cask' for main:Object #7716

Closed
hamiltop opened this issue Dec 1, 2014 · 2 comments
Closed

Error: undefined method `cask' for main:Object #7716

hamiltop opened this issue Dec 1, 2014 · 2 comments

Comments

@hamiltop
Copy link

hamiltop commented Dec 1, 2014

When I run brew cask install elm-platform (or any package) I get:

Error: undefined method `cask' for main:Object
Please report this bug:
    https://github.com/caskroom/homebrew-cask/issues
/usr/local/Library/Taps/caskroom/homebrew-cask/Casks/haskell-platform.rb:1:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Cellar/brew-cask/0.37.1/rubylib/cask/source/path_base.rb:22:in `load'
/usr/local/Cellar/brew-cask/0.37.1/rubylib/cask/source/tapped.rb:28:in `load'
/usr/local/Cellar/brew-cask/0.37.1/rubylib/cask.rb:120:in `load'
/usr/local/Cellar/brew-cask/0.37.1/rubylib/cask/cli/install.rb:19:in `block in install_casks'
/usr/local/Cellar/brew-cask/0.37.1/rubylib/cask/cli/install.rb:17:in `each'
/usr/local/Cellar/brew-cask/0.37.1/rubylib/cask/cli/install.rb:17:in `install_casks'
/usr/local/Cellar/brew-cask/0.37.1/rubylib/cask/cli/install.rb:6:in `run'
/usr/local/Cellar/brew-cask/0.37.1/rubylib/cask/cli.rb:80:in `run_command'
/usr/local/Cellar/brew-cask/0.37.1/rubylib/cask/cli.rb:120:in `process'
/usr/local/bin/brew-cask.rb:42:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Library/brew.rb:59:in `require?'
/usr/local/Library/brew.rb:142:in `<main>'
@hamiltop
Copy link
Author

hamiltop commented Dec 1, 2014

brew upgrade caskroom/cask/brew-cask fixed it. Perhaps a better error message saying to try upgrading brew-cask would be good?

@rolandwalker
Copy link
Contributor

Hi!

Yes, we try to generate those nice upgrade messages. In this case, the header line format had changed, and there was no way to catch the exception.

With that in mind, we cut forward-compatibility code 28 Jul 2014 (v0.38.0), deferred the header switchover until 13 Nov 2014 (#7315), and kept a banner on README.md until today (#7698).

That's not to dismiss your bug report – the real-world data point is helpful and appreciated. We apologize for the inconvenience, and will keep trying to manage transitions to new features as smoothly we can (#4688).

@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants