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
Related
I had created a project using "heroku create". After changing the name the domain URL was not working so I deleted the project.
Now I'm executing "heroku create" but it is giving an error. I tried many solutions but none of them are working for me. kindly help.
ANAMIKA#W1650044 MINGW64 /c/Sites/myrubyblog (master)
$ heroku create
WARNING: This is the legacy Heroku CLI with limited functionality. Please install the latest CLI.
WARNING: Installation instructions are at https://cli.heroku.com
heroku-cli: Installing CLI... 24.45MB/24.45MBPermission denied # rb_sysopen - C:\Users\ANAMIKA\AppData\Local/heroku/cli/lib/node.exe
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:107:in `initialize'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:107:in `open'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:107:in `block (4 levels) in setup'
C:/Program Files (x86)/Heroku/ruby-2.1.7/lib/ruby/2.1.0/rubygems/package/tar_reader.rb:64:in `each'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:98:in `block (3 levels) in setup'
C:/Program Files (x86)/Heroku/ruby-2.1.7/lib/ruby/2.1.0/rubygems/package/tar_reader.rb:28:in `new'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:96:in `block (2 levels) in setup'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:95:in `open'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:95:in `block in setup'
C:/Program Files (x86)/Heroku/ruby-2.1.7/lib/ruby/2.1.0/tmpdir.rb:88:in `mktmpdir'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:63:in `setup'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/cli.rb:42:in `start'
C:/Program Files (x86)/Heroku/bin/heroku:29:in `<main>'
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: Permission denied # rb_sysopen - C:\Users\ANAMIKA\AppData\Local/heroku/cli/lib/node.exe (Errno::EACCES)
Command: heroku create
Version: heroku/toolbelt/3.99.3 (i386-mingw32) ruby/2.1.7
More information in C:/Users/ANAMIKA/.heroku/error.log
this is saying that you need to update your heroku cli, here are the instructions
depending on the way you installed it, you can update it running
heroku update
or
sudo apt-get update && sudo apt-get upgrade heroku
I'm trying to use Linuxbrew to manage my dependencies; however, when I attempt to install I receive an error.
Error: No such file or directory - /usr/local/bin/rub
I have attempted to install using the source files and running
./configur-prefix=$Home/env
make
make install
which gives the following report:
installing binary commands: /env/bin
/home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:226:in `mkdir': Permission denied # dir_s_mkdir - /env (Errno::EACCES)
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:226:in `fu_mkdir'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:207:in `block (2 levels) in mkdir_p'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:205:in `reverse_each'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:205:in `block in mkdir_p'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:191:in `each'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:191:in `mkdir_p'
from ./tool/rbinstall.rb:194:in `makedirs'
from ./tool/rbinstall.rb:306:in `prepare'
from ./tool/rbinstall.rb:344:in `block in <main>'
from ./tool/rbinstall.rb:822:in `block in <main>'
from ./tool/rbinstall.rb:819:in `each'
from ./tool/rbinstall.rb:819:in `<main>'
make: *** [do-install-all] Error 1
Godaddy does not allow sudo or su access. The server info
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
I need Homebrew to install xz and glibc before I can install Ruby, or update the gcc version. Unfortunately, both produce the first error.
Could anyone help me install this package? My real endgoal is updating gcc through brew.
You don't have needed permissions to do that in the shared hosting:
in `mkdir': Permission denied # dir_s_mkdir - /env (Errno::EACCES)
When you try to create the directory, the installation fails.
You need a VPS, a dedicated server or a shared hosting preconfigurated.
I have found out a workaround for this issue to be able to install homebrew without root and sudo access.
Just follow the instruction on the Alternative Installation section of brew.sh and it will wonderfully work with no mayor issues at all.
This option will not work if you do not meet the minimum requirements regarding the glibc version.
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.
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.
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