I am using Paperclip and getting this error on the deployed site, not on my local server. And that's why it is becoming more difficult for me to get out of this.
A Paperclip::Errors::CommandNotFoundError occurred in images#update:
enter code hereCould not run the `identify` command. Please install ImageMagick.
I have tried these solutions but was not able to fix this (For ubuntu):
Ran apt-get install imagemagick
I don't use brew. So, won't be able to use brew install imagemagick
Added and deployed these lines to paperclip_options.yml
:image_magick_path: '/opt/ImageMagick/bin'
:command_path: '/opt/ImageMagick/bin'
Can anyone suggest how to resolve this error?
Related
I'm new to ruby on rails, and I'm trying to add a WYSIWYG editor to my website. I have installed bootsy following the instructions on https://github.com/volmer/bootsy. It is giving me this error whenever I try to upload an image: Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: ImageMagick/GraphicsMagick is not installed
What is going on?
If you see bootsy's readme requirements, you will notice the following:
ImageMagick or GraphicsMagick (for MiniMagick)
This means that to run the plugin you will need ImageMagick installed on your local machine. This is very easy to do.
If you are on Mac:
brew install imagemagick
On Ubuntu:
sudo apt-get install imagemagick
For the other operating systems, you can read more on ImageMagick's official website.
I have application using Rails 4 and Ruby 2. I started to use mongoid-paperclip and it is working fine.
I installed ImageMagick-6.8.6-8. I added Paperclip.options[:command_path] = "/usr/local/bin/" in development.rb. And I have
mongoid-paperclip
rmagick (~> 2.13.2)
cocaine (0.5.1)
When I added "has_mongoid_attached_file :avatar, :styles => { :small => "160x160!" }" I started to get this error: Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError
Any help please I spent hours and hours without any luck.
NOTE: This solution is for OS-X machines and imagemagick installed via "brew"
Some of my students (I teach Rails at a dev bootcamp) had the exact same problem on their Mac OS-X machines. And, the following solution fixed them all.
The Cause
The cause of the problem is that jmagemagick is compiled using a wrong GCC compiler in your box. Although it probably has compiled into an executable (binary), however, when it runs, it fails due to linking errors (it's trying to dynamically load some dependencies, ie, libraries).
The Solution
You need to reinstall imagemagick using a correct GCC. If you have a Mac, please, follow the instructions below:
Open XCode program (if you don't have it, install it)
Go to Preference and open "Download" tab
Download "Command line tool"
After download is complete, open a terminal
Run "brew reinstall imagemagick"
That should do it!
When using brew install imagemagick, it seems to install a precompiled binary that lacks TIFF support. Use this to install ImageMagick with proper TIFF support:
brew install libtiff
brew reinstall imagemagick --with-libtiff
(Credits to Groveriffic: https://stackoverflow.com/a/13150641/235297)
1- I have the same issue, and I solved it, when i configure the dynamic linker run-time bindings to create the necessary links and cache to the most recent shared libraries using the ldconfig command.
So you need to use the following command:
sudo ldconfig /usr/local/lib
Actually, I advice to re-install imagemagick using steps at how-to-install-image-magick-and-setup-paperclip.
2- You need to add the following code in development.rb file:
Paperclip.options[:command_path] = "/usr/local/bin/"
Running these two commands did the trick for me. Remember to use the --force since libtool is keg-only
brew install libtool --universal
brew link libtool --force
I programmed a website in Rails on Ubuntu 12.10.
after some while, when I came back to check it, when look at localhost:3000,
everything is ok until we click on anything, i see a page that say
libMagickCore.so.4: cannot open shared object file: No such file or directory - /home/dare/.rvm/gems/ruby-1.9.3-p194/gems/rmagick-2.13.1/lib/RMagick2.so
i find this Error using rmagick in rails application
but it's not useful for me.
Any help is appreciated, Thanks.
I think that libMagickCore belongs to imagemagick.
Try reinstall it:
sudo apt-get remove imagemagick
Then
sudo apt-get install imagemagick
This happened to me, also, when I upgraded from Ubuntu 12.04 to 12.10.
Reinstalling the gem will get things working for you
gem install rmagick
I have been trying to install ImageMagick for one week. The documentation I found over the net it is contradictory and I didn't find the proper way to install it and configure it. As well as I am not an UNIX expert so I don´t know how to use Enviroments paths correctly.
My software versions are:
S.O.: Mac OS 10.5.8,
ImageMagick v6.7.7,
Paperclip v3.1.2,
Rails v3.0
Some hints:
The ~/.profile file:
export PATH=$HOME/Users/mac_name/.gem/ruby/1.8/bin:$PATH
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export MAGICK_HOME="/Users/mac_name/ImageMagick-6.7.7"
export DYLD_LIBRARY_PATH=$MAGICK_HOME/lib/
export DISPLAY=:0
I install ImageMagick with an installation script. Its located in: Users/mac_name/ImageMagick-6.7.7
Now I think it´s installed but paperclip it does not run. I still have the error: "Photo Could not run the identify command. Please install ImageMagick".
$ echo $MAGICK_HOME
it returns: "/Users/mac_name/Users/mac_name/ImageMagick-6.7.7" (I don´t know why "Users/mac_name" it is repeated)
I need help. Any other gem that does not need ImageMagick? I am totally upset of this...
I will suggest you to install homebrew and then install imagemagick using that.
To install Homebrew check this. Basically just copy paste this on your terminal:
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
Now to install imagemagick run this command:
brew install imagemagick
Lemme know if you face any issues.
Mohit has a great answer but the link seems broken now so checkout either
Homebrew Homepage at http://brew.sh or the Github page at https://github.com/mxcl/homebrew
Both have good instructions on proper installation
I've had ImageMagick, RMagick, & PaperClip working properly with everything setup including the config Paperclip.options[:command_path] in production.rb file.
All of a sudden I've started getting the following error:
Could Not Run The `Identify` Command. Please Install ImageMagick.
I've tried everything. I've reinstalled ImageMagick, etc. but no avail.
Any help would be greatly appreciated.
From a terminal, run the following command:
sudo apt-get install imagemagick
You need to change the files production.rb and development.rb which are in:
config/environments:
# Paperclip config:
Paperclip.options[:image_magick_path] = "/opt/ImageMagick/bin"
Paperclip.options[:command_path] = "/opt/ImageMagick/bin"
Just add those two lines just before the last line and restart the server.
In MacOSX system, if you are using another location, just put the right PATH there.
For Mac users: just run the command brew install imagemagick.
You can type
which convert and which identify
to check whether imagemagick is installed properly.
In my case, which convert returns /usr/local/bin/convert but identify not found.
I used brew install imagemagick before, so I run it again and return imagemagick already installed, it's just not linked.
Finally got the point, brew link imagemagick(or brew link --overwrite imagemagick)
Don't forget to add the Paperclip.options[:command_path] = "/usr/local/bin/" to your config/environment.rb file.
I had a same issue. This is what worked for me. From terminal, first:
sudo apt-get update
Then:
sudo apt-get install imagemagick
I had this issue, when I had started rails server from my rubymine ide. It seems it does not load your .zshrc (in my case, could also be valid for .bashrc). So some environment variables that make imagemagick work with dvm were not set. For example:
export PATH=$HOME/local/imagemagick/bin:$PATH
export LD_LIBRARY_PATH=$HOME/local/imagemagick/lib:$LD_LIBRARY_PATH
Once I restarted from my terminal, the error was gone.
I had the same problem. It was caused by https://github.com/thoughtbot/paperclip/issues/1709
This is how I solved this issue:
sudo apt install imagemagick
For Cent OS users:
sudo yum install ImageMagick ImageMagick-devel
will do the job