Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8651777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:09:10+00:00 2026-06-12T14:09:10+00:00

I’m getting an error when I run the Spree sample data. It occurs when

  • 0

I’m getting an error when I run the Spree sample data. It occurs when Spree tries to load in the product data, specifically the product images. Here’s the error I’m getting:

* Execute db:load_file
loading ruby <GEM DIR>/sample/lib/tasks/../../db/sample/spree/products.rb
-- Processing image: ror_tote.jpeg
rake aborted!
/var/folders/91/63kgbtds2czgp0skw3f8190r0000gn/T/ror_tote.jpeg20121007-21549-2rktq1 is not recognized by the 'identify' command.
<GEM DIR>/paperclip-2.7.1/lib/paperclip/geometry.rb:31:in `from_file'
<GEM DIR>/spree/core/app/models/spree/image.rb:35:in `find_dimensions'

I’ve made sure ImageMagick is installed correctly, as previously I was having problems with it. Here’s the output I’m getting when running the identify command directly.

$ identify
Version: ImageMagick 6.7.7-6 2012-10-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features:  OpenCL 
... other usage info omitted ...

I also used pry with the pry-debugger and put a breakpoint in geometry.rb inside of Paperclip. Here’s what that section of geometry.rb looks like:

# Uses ImageMagick to determing the dimensions of a file, passed in as either a
# File or path.
# NOTE: (race cond) Do not reassign the 'file' variable inside this method as it is likely to be
# a Tempfile object, which would be eligible for file deletion when no longer referenced.
def self.from_file file
  file_path = file.respond_to?(:path) ? file.path : file
  raise(Errors::NotIdentifiedByImageMagickError.new("Cannot find the geometry of a file with a blank name")) if file_path.blank?
  geometry = begin
               silence_stream(STDERR) do
                 binding.pry
                 Paperclip.run("identify", "-format %wx%h :file", :file => "#{file_path}[0]")
               end
             rescue Cocaine::ExitStatusError
               ""
             rescue Cocaine::CommandNotFoundError => e
               raise Errors::CommandNotFoundError.new("Could not run the `identify` command. Please install ImageMagick.")
             end
  parse(geometry) ||
    raise(Errors::NotIdentifiedByImageMagickError.new("#{file_path} is not recognized by the 'identify' command."))
end

At the point of my binding.pry statement, the file_path variable is set to the following:

file_path => "/var/folders/91/63kgbtds2czgp0skw3f8190r0000gn/T/ror_tote.jpeg20121007-22732-1ctl1g1" 

I’ve also double checked that this exists, by opening my finder in this directory, and opened it with preview app; and also that the program can run identify by running %x{identify} in pry, and I receive the same version Version: ImageMagick 6.7.7-6 2012-10-06 Q16 as before.

Removing the additional digits (is this a timestamp?) after the file extension and running the Paperclip.run command manually in Pry gives me a different error:

Cocaine::ExitStatusError: Command 'identify -format %wx%h :file' returned 1. Expected 0

I’ve also tried manually updating the Paperclip gem in Spree to 3.0.2 and still get the same error. So, I’m not really sure what else to try. Is there still something incorrect with my ImageMagick setup?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:09:12+00:00Added an answer on June 12, 2026 at 2:09 pm

    As mentioned here, the new Cocaine gem changes the API used, breaking older Paperclip gems. I solved this by explicitly requiring version 0.3.2 of Cocaine in my Gemfile, but I’ve also just noticed that since I posted this question, the Spree master branch has also added this requirement, so this shouldn’t be required anymore.

    gem 'cocaine', '0.3.2' 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Specifically, suppose I start with the string string =hello \'i am \' me And
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want to construct a data frame in an Rcpp function, but when I
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.