brew install : undefined method `desc' - homebrew

I try to install some softs with homebrew.
But I get the following :
>>>brew install irssi
Error: undefined method `desc' for Formulary::Formulae::Irssi:Class
Please report this bug:
http://git.io/brew-troubleshooting
/nfs/zfs-student-3/users/2013_paris/vmonteco/.brew/Library/Formula/irssi.rb:2:in `<class:Irssi>'
/nfs/zfs-student-3/users/2013_paris/vmonteco/.brew/Library/Formula/irssi.rb:1:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:92:in `module_eval'
/usr/local/Library/Homebrew/formulary.rb:92:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:82:in `klass'
/usr/local/Library/Homebrew/formulary.rb:71:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:200:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `formulae'
/usr/local/Library/Homebrew/cmd/install.rb:42:in `install'
/usr/local/Library/brew.rb:135:in `<main>'
I tried to do brew update and retry, but I got the same issue.
I tried to use brew doctor but I get dozens (hundreds?) of the following :
undefined method `desc' for Formulary::Formulae::<something>::Class
How could I fix this? Even a workaround would be fine.
Thank you in advance for your help!

An undefined method of desc indicates that your Homebrew is outdated. The recommended solution is to update your Homebrew version with:
$ brew update -v
Using the -v flag will provide additional output. Run the command twice, and then attempt to install a formula again.

Related

brew services list shows error undefined method `chomp'

I have a osx bigsur and installed homebrew. Why when I run brew services list I get error:
Error: undefined method `chomp' for nil:NilClass
/opt/homebrew/Library/Taps/homebrew/homebrew
services/lib/service/services_cli.rb:53:in `user_of_process'
/opt/homebrew/Library/Taps/homebrew/homebrew-
services/lib/service/services_cli.rb:139:in `block in list'
/opt/homebrew/Library/Taps/homebrew/homebrew-
services/lib/service/services_cli.rb:127:in `map'
/opt/homebrew/Library/Taps/homebrew/homebrew-
services/lib/service/services_cli.rb:127:in `list'
/opt/homebrew/Library/Taps/homebrew/homebrew-
services/lib/service/commands/list.rb:9:in `run'
/opt/homebrew/Library/Taps/homebrew/homebrew-services/cmd/services.rb:84:in `services'
/opt/homebrew/Library/Homebrew/brew.rb:129:in `<main>'
When I run sudo brew services list, then all working good. How I can resolve issue with command without sudo ? brew services list

`package_name': 'package' not found in aapt output (RuntimeError) while running calabash in docker

I got the error response package_name': 'package' not found in aapt output (RuntimeError) when I run the calabash-android in docker file. Can anyone please tell me why it is happening like this. The full error response is pasting below.
sh: 1: /usr/local/android-sdk/build-tools/19.1.0/aapt: not found
/usr/local/bundle/gems/calabash-android-0.7.2/lib/calabash-android/helpers.rb:18:in `package_name': 'package' not found in aapt output (RuntimeError)
from /usr/local/bundle/gems/calabash-android-0.7.2/bin/calabash-android-build.rb:42:in `block (2 levels) in calabash_build'
from /usr/local/bundle/gems/calabash-android-0.7.2/bin/calabash-android-build.rb:38:in `chdir'
from /usr/local/bundle/gems/calabash-android-0.7.2/bin/calabash-android-build.rb:38:in `block in calabash_build'
from /usr/local/lib/ruby/2.3.0/tmpdir.rb:89:in `mktmpdir'
from /usr/local/bundle/gems/calabash-android-0.7.2/bin/calabash-android-build.rb:37:in `calabash_build'
from /usr/local/bundle/gems/calabash-android-0.7.2/lib/calabash-android/helpers.rb:106:in `build_test_server_if_needed'
from /usr/local/bundle/gems/calabash-android-0.7.2/bin/calabash-android-run.rb:16:in `calabash_run'
from /usr/local/bundle/gems/calabash-android-0.7.2/bin/calabash-android:84:in `<top (required)>'
from /usr/local/bundle/bin/calabash-android:22:in `load'
from /usr/local/bundle/bin/calabash-android:22:in `<main>'
Since I haven't integrated calabash-android in docker before could not figure out the exact issue. All kinda helps are appreciated. Thanks
Reading the error message, it looks like the android tools are not installed in your container.
The issue raises since the android dependencies are not installed.
I fixed the issue by installing the dependencies. And the command to install the dependencies is apt-get install lib32stdc++6 lib32z1 lib32z1-dev

Carrierwave, MiniMagick - NoMethodError: undefined method `size' for nil:NilClass

On staging, I'm facing the following error on uploading and resizing an image through carrierwave and minimagick. On local everything works fine.
carrierwave (0.9.0)
mini_magick (3.7.0)
irb(main):003:0> PicturePost.create(remote_content_url: 'http://www.imagpress.com/img/slider/slider_1.jpg')
NoMethodError: undefined method `size' for nil:NilClass
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/mini_magick-3.7.0/lib/mini_magick.rb:24:in `choose_processor'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/mini_magick-3.7.0/lib/mini_magick.rb:64:in `mogrify?'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:360:in `run_command'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:171:in `valid?'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:140:in `create'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:48:in `read'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:111:in `block in open'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:110:in `open'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/mini_magick-3.7.0/lib/mini_magick/image.rb:110:in `open'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/carrierwave-0.9.0/lib/carrierwave/processing/mini_magick.rb:260:in `manipulate!'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/carrierwave-0.9.0/lib/carrierwave/processing/mini_magick.rb:176:in `resize_to_fill'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/carrierwave-0.9.0/lib/carrierwave/uploader/processing.rb:85:in `block in process!'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/carrierwave-0.9.0/lib/carrierwave/uploader/processing.rb:81:in `each'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/carrierwave-0.9.0/lib/carrierwave/uploader/processing.rb:81:in `process!'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/carrierwave-0.9.0/lib/carrierwave/uploader/callbacks.rb:18:in `block in with_callbacks'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/carrierwave-0.9.0/lib/carrierwave/uploader/callbacks.rb:18:in `each'
9 levels...
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/carrierwave-0.9.0/lib/carrierwave/uploader/download.rb:65:in `download!'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/carrierwave-0.9.0/lib/carrierwave/mount.rb:353:in `remote_url='
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/carrierwave-0.9.0/lib/carrierwave/mount.rb:203:in `remote_content_url='
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/carrierwave-0.9.0/lib/carrierwave/orm/activerecord.rb:44:in `remote_content_url='
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.15/lib/active_record/attribute_assignment.rb:85:in `block in assign_attributes'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.15/lib/active_record/attribute_assignment.rb:78:in `each'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.15/lib/active_record/attribute_assignment.rb:78:in `assign_attributes'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.15/lib/active_record/base.rb:498:in `initialize'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.15/lib/active_record/persistence.rb:44:in `new'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/activerecord-3.2.15/lib/active_record/persistence.rb:44:in `create'
from (irb):3
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/commands/console.rb:47:in `start'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/commands/console.rb:8:in `start'
from /home/deploy/apps/staging/blog/shared/bundle/ruby/1.9.1/gems/railties-3.2.15/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
Can't figure out why this is happening.
Had forgotten to install imagemagick on my new server.
This solved the issue for me
sudo apt-get install imagemagick
This error occurs when MiniMagick looks for the commands mogrify or gm and fails to find either one.
As mentioned in another answer, you need to make sure that ImageMagick or GraphicsMagick is installed with a command such as
sudo apt-get install imagemagick
However, this problem can also occur if ImageMagick is installed in a non-standard location and is not available on the path of the Rails process. For example, if you install from source into /usr/local/bin, that location might not be on the path. In this case, to ensure that your path is set up correctly, add this line to application.rb, environments/production.rb, or some other appropriate place:
ENV['PATH'] += File::PATH_SEPARATOR + '/usr/local/bin'
Note that your path might be different depending on how the application is started, e.g. from the command line vs. from a system init file, so adding a line like this is important to ensure that MiniMagick will work correctly under all circumstances.
Under Linux, you can inspect the path of a running Rails process by finding the pid and then looking at /proc/<pid>/environ.
Looks like its a problem with mini_magick 3.7.0. Have a look at this issue
Homebrew & Yosemite-centric Answer:
http://thornelabs.net/2014/12/08/libpng-not-symlinking-when-installing-imagemagick-on-os-x-yosemite.html
Sure, you'll need to reinstall ImageMagick, but if running
brew install imagemagick
Gives you an error like:
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/man/man5/png.5
/usr/local/share/man/man5 is not writable.
...
First, check that your username has permission with
ls -al /usr/local/share/man
if you don't, you'll need to run
sudo chown -R yourusername /usr/local/share/man/man5
brew link libpng
Hope this saves someone some hours.
-B
If you are using the yum package manager (like I am for AWS Opsworks). You can do
yum install ImageMagick
note: ImageMagick spelt as camelcase
If you use some IDE probably the problem can solved just by restarting of IDE. I spend so much time trying to find solution for this problem. And this simple operation worked for me.
For other people who are using Rails and using mini_magick instead, change the version to 3.5 in your gemfile, as 3.6 is broken for image upload with mini_magick and simply doesn't work with version 3.7.

Imagemagick installation throws a string error on Mac/OSX 10.8.4

I went ahead with the following commands to install ImageMagick:
1. $ brew update
2. $ brew uninstall imagemagick
3. $ brew install imagemagick
Throws the following error:
Error: version '3' should be a string
Please report this bug:
https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/formula_support.rb:44:in `detect_version'
/usr/local/Library/Homebrew/formula_support.rb:65:in `version'
/usr/local/Library/Formula/imagemagick.rb:61
/usr/local/Library/Homebrew/formula.rb:666:in `instance_eval'
/usr/local/Library/Homebrew/formula.rb:666:in `bottle'
/usr/local/Library/Formula/imagemagick.rb:60
/usr/local/Library/Homebrew/formulary.rb:40:in `require'
/usr/local/Library/Homebrew/formulary.rb:40:in `klass'
/usr/local/Library/Homebrew/formulary.rb:90:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:175:in `factory'
/usr/local/Library/Homebrew/formula.rb:410:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `formulae'
/usr/local/Library/Homebrew/cmd/install.rb:22:in `install'
/usr/local/Library/brew.rb:95:in `send'
/usr/local/Library/brew.rb:95
How to fix this issue?
It's an error in the formula. You should report it to the Homebrew devs and it'll be fixed, if it's not fixed already.
I found help in the link below. Just follow the instructions:
https://github.com/mxcl/homebrew/issues/23547

I get error message:in `tr': invalid byte sequence in UTF-8 (ArgumentError) when I run: ruby dk.rb init

I have installed Ruby 1.92 in my computer, and would like to intall rails.
When I run: gem install rails, I get error message as below:
*D:\Ruby192\Devkit>gem install rails
*ERROR: Error installing rails:
The 'json' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'**
Then I download DevKit 4.5.2 or DevKit 3.5 and try them both as:
D:\Ruby192\Devkit>ruby dk.rb init
I always get error message:
d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:175:in `tr': invalid byte sequence in UTF-8 (ArgumentError)
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:175:in `initialize'
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:233:in `exception'
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:233:in `raise'
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:233:in `check'
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:256:in `OpenKey'
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:387:in `open'
from d:/Ruby192/lib/ruby/1.9.1/win32/registry.rb:498:in `open'
from dk.rb:118:in `block in scan_for'
from dk.rb:116:in `each'
from dk.rb:116:in `scan_for'
from dk.rb:138:in `block in installed_rubies'
from dk.rb:138:in `collect'
from dk.rb:138:in `installed_rubies'
from dk.rb:146:in `init'
from dk.rb:313:in `run'
from dk.rb:332:in `<main>'
Have you guys got any suggestion on the problem?
I have encountered the same situation. I think that you may want to install json library. You should use msys.bat and install json on this terminal.
Execute msys.bat in a DevKit directory -> it invokes a new terminal.
gem install json on this terminal.
You can continue gem install rails.
The problem was solved for me by clearing the LANG environment variable first:
set LANG=
ruby dk.rb init
The idea comes from this question on the RubyInstaller Google Group.

Resources