Imagemagick 6.8.10 on mountain lion using rails issues - ruby-on-rails

My code is here: https://github.com/pavankat/to_do_app
I used this tutorial: http://guides.railsgirls.com/thumbnails/
After running through the tutorial for a bit I got this error when trying to edit idea 1's picture (pretty much reupload the picture) so the thumbnail would appear:
Picture Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: MiniMagick::Invalid
I thought it was happening because I didn't restart the server, but I did that and it still happened.
I followed the instructions here: Rails and OS X: How to install rmagick? (question by TaianSu and chad bidwell), but no luck.
Then I followed this: Why is this RMagick call generating a segmentation fault? (Ash Berlin's response)
$ brew uninstall imagemagick && brew install imagemagick --disable-openmp
Uninstalling /usr/local/Cellar/imagemagick/6.8.0-10...
Error: You must `brew link jpeg' before imagemagick can be installed
so I did this:
$ brew rm jpeg
and then
$ brew install imagemagick --disable-openmp
then I restarted the server
I still get the error when making an idea or editing an idea's picture: Picture Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: MiniMagick::Invalid
I did this:
$ sudo chmod 777 /usr/local
but no luck
Tried this based on carrierwave + mini_magick gems = not an image error (B. Ruschill's response):
$ brew uninstall imagemagick
$ brew cleanup --force -s
$ brew rm jpeg
$ brew install imagemagick
but then it gave me an error that it couldn't link jpeg.
so I tried brew link jpeg. That didn't work.
so I tried brew link jpeg issues (David Riccitelli's response)
and I tried brew link jpeg again. That didn't work.

Related

Homebrew broken and unable to install anything

~ % brew install curl
==> Downloading https://ghcr.io/v2/homebrew/core/brotli/manifests/1.0.9
Already downloaded: /Users/currentuser/Library/Caches/Homebrew/downloads/922ce7b351cec833f9bd2641f27d8ac011005f8b1f7e1119b8271cfb4c0d3cd7--brotli-1.0.9.bottle_manifest.json
Error: curl: Failed to download resource "brotli_bottle_manifest"
The downloaded GitHub Packages manifest was corrupted or modified (it is not valid JSON):
/Users/currentuser/Library/Caches/Homebrew/downloads/922ce7b351cec833f9bd2641f27d8ac011005f8b1f7e1119b8271cfb4c0d3cd7--brotli-1.0.9.bottle_manifest.json
My Homebrew is broken and is unable to install anything. A typical output is above
The problem was resolved after delete /Users/currentuser/Library/Caches/Homebrew/downloads/922ce7b351cec833f9bd2641f27d8ac011005f8b1f7e1119b8271cfb4c0d3cd7--brotli-1.0.9.bottle_manifest.json
and run brew install curl again
It might be using the installed curl instead of system curl.
From man brew
set HOMEBREW_FORCE_BREWED_CURL
I have also this problem with brew install php
the problem persists even after deleting all the files from
/Users/currentuser/Library/Caches/Homebrew/downloads/
and
brew install php again
i have also tried
HOMEBREW_FORCE_BREWED_CURL=1 brew install openssl
This command fixed the issue for me:
brew cleanup

Unistall error using home-brew -> error using brew prune

I have Paste installed and want to uninstall it, currently running macOS High Sierra.
I have tried using the $ brew uninstall Paste and it gets returned with Error: No such keg: /usr/local/Cellar/paste.
After that I used $ brew update of which everything is up-to-date.
So after that I used $ brew doctor which returned
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Broken symlinks were found. Remove them with `brew prune`:
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuProN-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuProN-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuStd-W8
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuStdN-W8
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMaruPro-W4
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMaruProN-W4
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinPro-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinPro-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinProN-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinProN-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraginoSansGB-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraginoSansGB-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuGo-Bold
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuGo-Medium
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuMin-Demibold
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuMin-Medium
However, when I try and use $ brew prune I get returned with
Error: Permission denied # unlink_internal - /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W3
Can anyone help with this issue?
Simply run:
brew uninstall paste
You're getting the error: No such keg: /usr/local/Cellar/pastewhenbrew uninstall Past because there are no brew formulae installed or in the official Homebrew repository named paste.
brew install paste
Error: No available formula with the name "paste"
I guess you've installed it using cask:
brew cask install paste
If you try to uninstall it using brew you'll get that error:
brew uninstall Paste
Error: No such keg: /usr/local/Cellar/paste
To uninstall paste simply use brew cask instead:
brew cask uninstall paste

Unable to install Rmagick

I am installing rmagick in mac system, I have installed imagemagick version 7 by using the command brew install imagemagick , now I am executing gem install rmagick but I am getting the below error.
Can't install RMagick 2.16.0. Can't find MagickWand.h.
I have added export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH" in my bashfile but no luck
Finally , I downgraded the version of imagemagick to make it working i.e.
brew uninstall imagemagick
brew uninstal imagemagick#6
Then, set the path for MagicWand & MagicCore.h
export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick\#6/6.9.7-6/lib/pkgconfig/
Try uninstalling ImageMagick and re-installing with the --build-from-source option and that will get you the header you seek:
brew rm imagemagick
brew install imagemagick --build-from-source <ANY OTHER OPTIONS>
Now check you have it:
find /usr -name "MagickWand.h"
/usr/local/Cellar/imagemagick/7.0.4-6/include/ImageMagick-7/MagickWand/MagickWand.h

After installing ImageMagick, I cannot use it from the commandline

I installed ImageMagick using
$ sudo port install ImageMagick
However, when I run a basic command in a new terminal window, I get an error
$ convert logo.gif
-bash: convert: command not found
Why can't I run ImageMagick commands?
I've added ImageMagick to my path. See below for a bash profile:
#~/.bash_profile
export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib/"
export PATH="$MAGICK_HOME/bin:$PATH"
export MAGICK_HOME="$HOME/ImageMagick-6.8.9"
Note, I removed the above from my bash profile when I applied my solution.
I uninstalled macports and installed homebrew instead. Then I installed ImageMagick with homebrew and it worked just fine.
I needed to use the command: brew install imagemagick --build-from-source. The regular command gave me a different error

Is there an easy way to install RMagick?

I am trying to install RMagick on my slicehost(Linux Hardy)
instead of compile from source, here is what I did:
$ sudo aptitude install -y imagemagick
$ sudo aptitude install -y libmagick9-dev
$ sudo gem install rmagick
After installed, it reads GIF with no problem, however for JPEG and PNG, I keep getting this error:
Magick::ImageMagickError: no decode delegate for this image format
I know it is probably because I don't have libpng and libjpg libraries, but i didn't find guide on how to install these. I compiled libpng and libjpg from source, with no luck, the files are in the /usr/lib, but i still getting the error.
I found this to be very help: how to install rmagick on linux
Try Installing ImageMagick from Source
You definitely want to follow the recommendation here:
http://rmagick.rubyforge.org/install-faq.html#delegate
It's probably more likely that everything is fine, but you need to reconfigure your image magick install after adding the jpeg delegate.

Resources