imagemagic errors

Hey everyone, I'm still having a ton of image issues.

I had been using attachment_fu and ran into errors so i changed to paperclip. attachment_fu was working to a degree but ran into some other issues. Not it seems imagemagick is broken.

I've installed paperclip. With no image editing it works fine. As soon as I need to thumbnail anything I get this error:

[paperclip] An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError: /var/folders/4s/ 4sQnoBr2F2yB6Y37PPp9U++++TI/-Tmp-/IMG_1207,321,0.jpg is not recognized by the 'identify' command.> [paperclip] An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError: /var/folders/4s/ 4sQnoBr2F2yB6Y37PPp9U++++TI/-Tmp-/IMG_1207,321,0.jpg is not recognized by the 'identify' command.> [paperclip] An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError: /var/folders/4s/ 4sQnoBr2F2yB6Y37PPp9U++++TI/-Tmp-/IMG_1207,321,0.jpg is not recognized by the 'identify' command.>

I've tried adding all of the following (separately) to the initializers/paperclip.rb as well as environments/development.rb

Paperclip.options[:swallow_stderr] = false Paperclip.options[:command_path] = "/usr/bin" Paperclip.options[:command_path] = "/opt/local/bin" Paperclip.options[:command_path] = "/usr/local/ImageMagick/" Paperclip.options[:image_magick_path] = '/opt/local/bin'

None of these solved the issue.

I also tried reinstalling ImageMagick via macports: sudo port install ImageMagick

I've updated my macports and all installed ports.

I've tried installing imageMagick via an anti-macports script: http://github.com/maddox/magick-installer/blob/master/magick-installer.sh

I'm tried running "identify" on the command line brianp$ identify image.jpg -bash: identify: command not found

So I'm assuming the problem is at the heart of the installation as it seems none of the functions are being installed.

Anyone have any new suggestions ?

Hey brian,

why don’t you try file_column plugin of active scaffold to do file upload its very good and easy to use.

Hey, I believe that would still require the use of ImageMagic/RMagick, which would loop me back around to the current problem. I assume paperclip is working as it should. And ImageMagic is the problem.

Hey everyone,

I’m still having a ton of image issues.

I had been using attachment_fu and ran into errors so i changed to

paperclip. attachment_fu was working to a degree but ran into some

other issues. Not it seems imagemagick is broken.

I’ve installed paperclip. With no image editing it works fine. As soon

as I need to thumbnail anything I get this error:

[paperclip] An error was received while processing:

#<Paperclip::NotIdentifiedByImageMagickError: /var/folders/4s/

4sQnoBr2F2yB6Y37PPp9U++++TI/-Tmp-/IMG_1207,321,0.jpg is not recognized

by the ‘identify’ command.>

[paperclip] An error was received while processing:

#<Paperclip::NotIdentifiedByImageMagickError: /var/folders/4s/

4sQnoBr2F2yB6Y37PPp9U++++TI/-Tmp-/IMG_1207,321,0.jpg is not recognized

by the ‘identify’ command.>

[paperclip] An error was received while processing:

#<Paperclip::NotIdentifiedByImageMagickError: /var/folders/4s/

4sQnoBr2F2yB6Y37PPp9U++++TI/-Tmp-/IMG_1207,321,0.jpg is not recognized

by the ‘identify’ command.>

I’ve tried adding all of the following (separately) to the

initializers/paperclip.rb as well as environments/development.rb

Paperclip.options[:swallow_stderr] = false

Paperclip.options[:command_path] = “/usr/bin”

Paperclip.options[:command_path] = “/opt/local/bin”

Paperclip.options[:command_path] = “/usr/local/ImageMagick/”

Paperclip.options[:image_magick_path] = ‘/opt/local/bin’

None of these solved the issue.

I also tried reinstalling ImageMagick via macports:

sudo port install ImageMagick

I’ve updated my macports and all installed ports.

I’ve tried installing imageMagick via an anti-macports script:

http://github.com/maddox/magick-installer/blob/master/magick-installer.sh

I’m tried running “identify” on the command line

brianp$ identify image.jpg

-bash: identify: command not found

So I’m assuming the problem is at the heart of the installation as it

seems none of the functions are being installed.

Anyone have any new suggestions ?

Brian, I have installed ImageMagick via MacPorts and it’s working as expected. For example,

$ identify ./Library/Caches/Java/cache/javaws/splash/splash13217.jpg

./Library/Caches/Java/cache/javaws/splash/splash13217.jpg JPEG 320x80 320x80+0+0 8-bit DirectClass 6.3KiB 0.010u 0:00.030

Furthermore, I’m using both Snow Leopard and Leopard. Thus, if you cannot access identify, then I would recommend checking

your PATH environment variable first to make sure that your PATH looks something like this:

export PATH=/opt/local/bin:/opt/local/sbin:${PATH}

Good luck,

-Conrad

Please make sure, you have proper authentication in image uploading folder.

Hey everyone,

I’m still having a ton of image issues.

I had been using attachment_fu and ran into errors so i changed to

paperclip. attachment_fu was working to a degree but ran into some

other issues. Not it seems imagemagick is broken.

I’ve installed paperclip. With no image editing it works fine. As soon

as I need to thumbnail anything I get this error:

[paperclip] An error was received while processing:

#<Paperclip::NotIdentifiedByImageMagickError: /var/folders/4s/

4sQnoBr2F2yB6Y37PPp9U++++TI/-Tmp-/IMG_1207,321,0.jpg is not recognized

by the ‘identify’ command.>

[paperclip] An error was received while processing:

#<Paperclip::NotIdentifiedByImageMagickError: /var/folders/4s/

4sQnoBr2F2yB6Y37PPp9U++++TI/-Tmp-/IMG_1207,321,0.jpg is not recognized

by the ‘identify’ command.>

[paperclip] An error was received while processing:

#<Paperclip::NotIdentifiedByImageMagickError: /var/folders/4s/

4sQnoBr2F2yB6Y37PPp9U++++TI/-Tmp-/IMG_1207,321,0.jpg is not recognized

by the ‘identify’ command.>

I’ve tried adding all of the following (separately) to the

initializers/paperclip.rb as well as environments/development.rb

Paperclip.options[:swallow_stderr] = false

Paperclip.options[:command_path] = “/usr/bin”

Paperclip.options[:command_path] = “/opt/local/bin”

Paperclip.options[:command_path] = “/usr/local/ImageMagick/”

Paperclip.options[:image_magick_path] = ‘/opt/local/bin’

None of these solved the issue.

I also tried reinstalling ImageMagick via macports:

sudo port install ImageMagick

I’ve updated my macports and all installed ports.

I’ve tried installing imageMagick via an anti-macports script:

http://github.com/maddox/magick-installer/blob/master/magick-installer.sh

I’m tried running “identify” on the command line

brianp$ identify image.jpg

-bash: identify: command not found

So I’m assuming the problem is at the heart of the installation as it

seems none of the functions are being installed.

Anyone have any new suggestions ?

Brian, I have installed ImageMagick via MacPorts and it’s working as expected. For example,

$ identify ./Library/Caches/Java/cache/javaws/splash/splash13217.jpg

./Library/Caches/Java/cache/javaws/splash/splash13217.jpg JPEG 320x80 320x80+0+0 8-bit DirectClass 6.3KiB 0.010u 0:00.030

Furthermore, I’m using both Snow Leopard and Leopard. Thus, if you cannot access identify, then I would recommend checking

your PATH environment variable first to make sure that your PATH looks something like this:

export PATH=/opt/local/bin:/opt/local/sbin:${PATH}

Good luck,

-Conrad

Brian, I would also recommend watching the following screencasts by Ryan Bates on the use of Paperclip:

http://railscasts.com/episodes?search=paperclip

Lastly, I would recommend adding each step of your usage of Ruby gems or plugins starting with the installation

because it makes it much easier to assist you.

Good luck,

-Conrad

So i tried: export MAGICK_HOME="/opt/local/" export PATH="$MAGICK_HOME/bin:$PATH" export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib"

no success.

So I tried re-installing imagemagick for a 4th(?) time so I could show you the input/output and now the re-install fails:

whiteone:~ brianp$ cd sites/autowholesaler-r/ whiteone:autowholesaler-r brianp$ sudo port install ImageMagick Password: ------------------ ---> Computing dependencies for ImageMagick ---> Configuring xorg-libX11 Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_xorg- libX11/work/libX11-1.3.2" && ./configure --prefix=/opt/local --without- xcb " returned error 1 Command output: sh: line 0: cd: /opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_xorg- libX11/work/libX11-1.3.2: No such file or directory

Error: The following dependencies failed to build: xorg-libXext xorg- libX11 xorg-libXt xorg-libsm xorg-libice Error: Status 1 encountered during processing. Before reporting a bug, first run the command again with the -d flag to get complete output. whiteone:autowholesaler-r brianp$

This just keeps getting worse =(

So i tried:

export MAGICK_HOME=“/opt/local/”

export PATH=“$MAGICK_HOME/bin:$PATH”

export DYLD_LIBRARY_PATH=“$MAGICK_HOME/lib”

The above environment variables are not needed and you’re just making

matters worse if you’re using MacPorts. What version of MacPorts are

you using? Did you ‘sudo port selfupdate’ and ‘sudo port sync’ prior to

installing any port? If you installed MacPorts prior to the installation of

Snow Leopard, did you properly update your ports for this OS?

no success.

So I tried re-installing imagemagick for a 4th(?) time so I could show

you the input/output and now the re-install fails:

whiteone:~ brianp$ cd sites/autowholesaler-r/

whiteone:autowholesaler-r brianp$ sudo port install ImageMagick

Password: ------------------

—> Computing dependencies for ImageMagick

—> Configuring xorg-libX11

Error: Target org.macports.configure returned: configure failure:

shell command " cd "/opt/local/var/macports/build/

_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_xorg-

libX11/work/libX11-1.3.2" && ./configure --prefix=/opt/local --without-

xcb " returned error 1

Command output: sh: line 0: cd: /opt/local/var/macports/build/

_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_xorg-

libX11/work/libX11-1.3.2: No such file or directory

Error: The following dependencies failed to build: xorg-libXext xorg-

libX11 xorg-libXt xorg-libsm xorg-libice

Error: Status 1 encountered during processing.

Before reporting a bug, first run the command again with the -d flag

to get complete output.

whiteone:autowholesaler-r brianp$

This just keeps getting worse =(

Which OS and version are you using? Next, the above environment variables

are not needed. What version of MacPorts are you using? Did you ‘sudo port selfupdate’

and ‘sudo port sync’ prior to installing any port? If you installed MacPorts prior to

the installation of Snow Leopard, did you properly update your ports for this OS?

-Conrad

whiteone:~ brianp$ port -v MacPorts 1.8.2

I did "sudo port selfupdate" I don't believe i "sudo port sync"

I did not upgrade to snow leopard (because it blew up my server) I'm running on Mac os 10.5.8

I'm not a Mac user, so I can't contribute to much to this discussion :|. But as a general rule, **never** use your OS/ distribution's ImageMagick; compile it yourself and make sure you enable 8bit quantums. Otherwise, even with a correctly installed distribution provided ImageMagick, you waste a ton of memory and CPU due to the fact that 16bit quantums are enabled by default.

whiteone:~ brianp$ port -v

MacPorts 1.8.2

I did “sudo port selfupdate”

I don’t believe i “sudo port sync”

I did not upgrade to snow leopard (because it blew up my server)

I’m running on Mac os 10.5.8

What do you mean that it blew up your server? Snow Leopard worked

for me on the laptop and I’m still on Leopard on the desktop because it’s

a PowerMac. So, what’s the status of the installation because your last

e-mail didn’t provide any details?

-Conrad

whiteone:~ brianp$ port -v

MacPorts 1.8.2

I did “sudo port selfupdate”

I don’t believe i “sudo port sync”

I did not upgrade to snow leopard (because it blew up my server)

I’m running on Mac os 10.5.8

So i tried:

export MAGICK_HOME=“/opt/local/”

export PATH=“$MAGICK_HOME/bin:$PATH”

export DYLD_LIBRARY_PATH=“$MAGICK_HOME/lib”

The above environment variables are not needed and you’re just making

matters worse if you’re using MacPorts. What version of MacPorts are

you using? Did you ‘sudo port selfupdate’ and ‘sudo port sync’ prior to

installing any port? If you installed MacPorts prior to the installation of

Snow Leopard, did you properly update your ports for this OS?

no success.

So I tried re-installing imagemagick for a 4th(?) time so I could show

you the input/output and now the re-install fails:

whiteone:~ brianp$ cd sites/autowholesaler-r/

whiteone:autowholesaler-r brianp$ sudo port install ImageMagick

Password: ------------------

—> Computing dependencies for ImageMagick

—> Configuring xorg-libX11

Error: Target org.macports.configure returned: configure failure:

shell command " cd "/opt/local/var/macports/build/

_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_xorg-

libX11/work/libX11-1.3.2" && ./configure --prefix=/opt/local --without-

xcb " returned error 1

Command output: sh: line 0: cd: /opt/local/var/macports/build/

_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_xorg-

libX11/work/libX11-1.3.2: No such file or directory

Error: The following dependencies failed to build: xorg-libXext xorg-

libX11 xorg-libXt xorg-libsm xorg-libice

Error: Status 1 encountered during processing.

Before reporting a bug, first run the command again with the -d flag

to get complete output.

whiteone:autowholesaler-r brianp$

This just keeps getting worse =(

Which OS and version are you using? Next, the above environment variables

are not needed. What version of MacPorts are you using? Did you 'sudo port

selfupdate’

and ‘sudo port sync’ prior to installing any port? If you installed

MacPorts prior to

the installation of Snow Leopard, did you properly update your ports for

this OS?

-Conrad

Hey everyone,

I’m still having a ton of image issues.

I had been using attachment_fu and ran into errors so i changed to

paperclip. attachment_fu was working to a degree but ran into some

other issues. Not it seems imagemagick is broken.

I’ve installed paperclip. With no image editing it works fine. As soon

as I need to thumbnail anything I get this error:

[paperclip] An error was received while processing:

#<Paperclip::NotIdentifiedByImageMagickError: /var/folders/4s/

4sQnoBr2F2yB6Y37PPp9U++++TI/-Tmp-/IMG_1207,321,0.jpg is not recognized

by the ‘identify’ command.>

[paperclip] An error was received while processing:

#<Paperclip::NotIdentifiedByImageMagickError: /var/folders/4s/

4sQnoBr2F2yB6Y37PPp9U++++TI/-Tmp-/IMG_1207,321,0.jpg is not recognized

by the ‘identify’ command.>

[paperclip] An error was received while processing:

#<Paperclip::NotIdentifiedByImageMagickError: /var/folders/4s/

4sQnoBr2F2yB6Y37PPp9U++++TI/-Tmp-/IMG_1207,321,0.jpg is not recognized

by the ‘identify’ command.>

I’ve tried adding all of the following (separately) to the

initializers/paperclip.rb as well as environments/development.rb

Paperclip.options[:swallow_stderr] = false

Paperclip.options[:command_path] = “/usr/bin”

Paperclip.options[:command_path] = “/opt/local/bin”

Paperclip.options[:command_path] = “/usr/local/ImageMagick/”

Paperclip.options[:image_magick_path] = ‘/opt/local/bin’

None of these solved the issue.

I also tried reinstalling ImageMagick via macports:

sudo port install ImageMagick

I’ve updated my macports and all installed ports.

I’ve tried installing imageMagick via an anti-macports script:

http://github.com/maddox/magick-installer/blob/master/magick-installe.

I’m tried running “identify” on the command line

brianp$ identify image.jpg

-bash: identify: command not found

So I’m assuming the problem is at the heart of the installation as it

seems none of the functions are being installed.

Anyone have any new suggestions ?

Brian, I have installed ImageMagick via MacPorts and it’s working as

expected. For example,

$ identify ./Library/Caches/Java/cache/javaws/splash/splash13217.jpg

./Library/Caches/Java/cache/javaws/splash/splash13217.jpg JPEG 320x80

320x80+0+0 8-bit DirectClass 6.3KiB 0.010u 0:00.030

Furthermore, I’m using both Snow Leopard and Leopard. Thus, if you

cannot

access identify, then I would recommend checking

your PATH environment variable first to make sure that your PATH looks

something like this:

export PATH=/opt/local/bin:/opt/local/sbin:${PATH}

Good luck,

-Conrad

Brian, I would also recommend watching the following screencasts by Ryan

Bates on the use of Paperclip:

http://railscasts.com/episodes?search=paperclip

Lastly, I would recommend adding each step of your usage of Ruby gems or

plugins starting with the installation

because it makes it much easier to assist you.

Good luck,

-Conrad

You received this message because you are subscribed to the Google

Groups

“Ruby on Rails: Talk” group.

To post to this group, send email to

rubyonrails-talk@googlegroups.com.

To unsubscribe from this group, send email to

rubyonrails-talk+unsubscribe@googlegroups.com<rubyonrails-talk%2Bunsubscrib e@googlegroups.com>

<rubyonrails-talk%2Bunsubscribe@googlegroups.com<rubyonrails-talk%252Bunsub scribe@googlegroups.com>

.

For more options, visit this group at

http://groups.google.com/group/rubyonrails-talk?hl=en.

You received this message because you are subscribed to the Google Groups

“Ruby on Rails: Talk” group.

To post to this group, send email to rubyonrails-talk@googlegroups.com.

To unsubscribe from this group, send email to

rubyonrails-talk+unsubscribe@googlegroups.com<rubyonrails-talk%2Bunsubscrib e@googlegroups.com> .

For more options, visit this group at

http://groups.google.com/group/rubyonrails-talk?hl=en.

I’m not a Mac user, so I can’t contribute to much to this

discussion :|. But as a general rule, never use your OS/

distribution’s ImageMagick; compile it yourself and make sure you

enable 8bit quantums. Otherwise, even with a correctly installed

distribution provided ImageMagick, you waste a ton of memory and CPU

due to the fact that 16bit quantums are enabled by default.

Leopard or Snow Leopard installations do not provide ImageMagick. You

have to install it via MacPorts, Fink, or from the sources. I believe that

Brian my have something within his environment that prevents him from

completing the build.

-Conrad

Thanks you everyone for being so patient and providing suggestions that after time lead me to the answer.

It seems all my ports/libs in macports were well... ferbunked.

I tried to run a port upgrade outdated and it had so many errors. I slowly went through them activating, deactivating, re-installing one by one. Cleaning dependencies etc until I could run the upgrade. Then re-ran the ImageMagick install and it went off without a hitch. So it seems the first (4-5) times I installed it, despite the fact it never errored it did not in-fact install.

I corrected way to many items to list the full process here but I'll try and sum it up real quick.

My major references for the fixes were: http://trac.macports.org/ticket/18835 http://lists.macosforge.org/pipermail/macports-dev/2009-January/007093.html

The common error I was getting: Error: The following dependencies failed to build: {port here} Error: Unable to upgrade port: 1 Before reporting a bug, first run the command again with the -d flag to get complete output.

as well as:

Configuring xorg-libX11 Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_xorg- libX11/work/libX11-1.3.2" && ./configure --prefix=/opt/local --without- xcb " returned error 1 Command output: sh: line 0: cd: /opt/local/var/macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_xorg- libX11/work/libX11-1.3.2: No such file or directory

To start the fix: sudo port selfupdate //Just to do it again sudo port upgrade outdated

Wait until it errors on a certain library.

sudo port deactivate {LIBRARY NAME} sudo port clean {LIBRARY NAME}

Then re-run: sudo port upgrade outdated // See if it causes more errors, repeat fix accordingly.

The most troublesome library was: Activating xorg-renderproto @0.11_0 Error: Unable to execute port: Image error: /opt/local/include/X11/ extensions/render.h is being used by the active render port. Please deactivate this port first, or use 'port -f activate xorg-renderproto' to force the activation. Before reporting a bug, first run the command again with the -d flag to get complete output.

As the suggested fix in the error will not fix appropriately.

I had to run: sudo port deactivate render sudo port install xorg-renderproto sudo port upgrade outdated

Eventually all the libraries were straightened out. And I could re- install ImageMagick:

sudo port install ImageMagick

And Everything went off without a hitch from there. Paperclip seems to be working as desired.

Thanks again for everyone's help, patience and suggestions! And I hope some day down the road this helps someone else out there.

-brianp

By "blew up" my server:

I installed Snow Leopard the day it was released. I run the built in Mac OS Apache server with many add ons. The main one being the Marc Liyanage entropy package. At the time there wasn't support for snow leopard. So my server pretty much grinded to a halt for most processes. Being the first day there weren't many workarounds for it at the time. I've been to busy with projects to look back since. Luckily before any upgrade I clone my hd so it was no problem getting up and running again. I'm sure a lot of problems have been worked out since just haven't had the time to inquire.