Spree 1.1.0 demo on new rails 3.2.3 does not show images #1511

daniely opened this Issue May 8, 2012 · 9 comments

2 participants


I'm on mac osx, rails 3.2.3, ruby 1.9.3-p194, spree 1.1.0, rvm 1.10.2. ImageMagick was installed using homebrew and is on version 6.7.5-7

First I installed spree gem install spree
Then created new rails project rails new mystore
To install spree to my rails app I did cd mystore and then spree install

The site runs fine but I don't see any images when I run the demo site. I also see that the public/spree/products folder is empty.

Spree Commerce member

Hey there Daniel,

I am unable to reproduce this on my local machine. Can you show us the full output of spree install?


$ spree install
Would you like to install the default gateways? (yes/no) [yes]
Would you like to run the migrations? (yes/no) [yes]
Would you like to load the seed data? (yes/no) [yes]
Would you like to load the sample data? (yes/no) [yes]
Admin Email [spree@example.com]
Admin Password [spree123]
gemfile spree
gemfile spree_usa_epay
gemfile spree_skrill
run bundle install from "."
create config/initializers/spree.rb
create config/spree.yml
remove public/index.html
append public/robots.txt
create app/assets/javascripts/store
create app/assets/javascripts/admin
create app/assets/stylesheets/store
create app/assets/stylesheets/admin
create app/assets/images/store
create app/assets/images/admin
create app/assets/javascripts/store/all.js
create app/assets/javascripts/admin/all.js
create app/assets/stylesheets/store/all.css
create app/assets/stylesheets/admin/all.css
create app/overrides
append config/environment.rb
append db/seeds.rb
copying migrations
creating database
running migrations
loading seed data
loading sample data
insert config/routes.rb

We added the following line to your application's config/routes.rb file:

mount Spree::Core::Engine, :at => '/'

Spree has been installed successfully. You're all ready to go!

precompiling assets
/Users/Daniel/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /Users/Daniel/.rvm/gems/ruby-1.9.3-p194@global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets

Spree Commerce member

Weird, everything there seems fine... Can you upload an image successfully in the admin backend? Does it appear then?


This was my first time trying to add a new product. The product gets added fine but when trying to add an image this is the error I got

Paperclip::NotIdentifiedByImageMagickError in Spree::Admin::ImagesController#create

/var/folders/H6/H6+r+VUnF0y79tLcq1VRpU+++TI/-Tmp-/stream20120508-66736-1fo4qn6.png is not recognized by the 'identify' command.
Rails.root: /Users/Daniel/src/TestProjects/spree110

Application Trace | Framework Trace | Full Trace


"image"=>{"attachment"=># @content_type="image/png",
@headers="Content-Disposition: form-data; name=\"image[attachment]\"; filename=\"payment1.png\"\r\nContent-Type: image/png\r\n",
Show session dump

_csrf_token: "CDlXV0YZ/00pb7KDqm1FPTBOQnKvJj3w6ouN433YghU="
session_id: "8f7fb8415f8a8a19dba1eb9934fbb5fe"
warden.user.user.key: ["Spree::User", [1], "X75BDvNe1TVKQLFk9ah9"]
Show env dump

HTTP_ACCEPT: "text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8"
HTTP_ACCEPT_CHARSET: "ISO-8859-1,utf-8;q=0.7,*;q=0.3"
HTTP_ACCEPT_ENCODING: "gzip,deflate,sdch"
REMOTE_HOST: "practivate.adobe.com"
SERVER_NAME: "localhost"

Spree Commerce member

Does the identify command work on the command line?


Here's what I get

$ identify
dyld: Library not loaded: /usr/local/lib/liblcms2.2.dylib
Referenced from: /usr/local/bin/identify
Reason: image not found
[2] 66867 trace trap identify

Spree Commerce member

Alright, that looks like your imagemagick installation didn't go too well. I would suggest removing the homebrew version and compiling it from source.

@radar radar closed this May 8, 2012

Just wanted to let you know you were right, imagemagick wasn't installed correctly.

It looked like imagemagick was installed correctly since homebrew didn't throw any errors but there was something wrong with my homebrew install. Once I fixed homebrew (using brew doctor) then I was able to install imagemagick correctly. After that I created a new project and the images showed up correctly.

My only suggestion at this point would be to throw an error in spree if imagemagick isn't working right. As you saw from my case, it looked like a successful demo install but it wasn't. If you could point me to where I could check for something like that I'd be happy to submit a patch.

Thanks for the help @radar !

Spree Commerce member

You could probably try calling identify on an image inside the install generator somewhere, as a check before the installation process takes place. I am not sure how you would do this on a Windows computer. Perhaps using some rmagick API?

@daniely daniely pushed a commit that referenced this issue May 21, 2012
Daniel verify Image Magick installed (only on Macs)
references #1511
@radar radar added a commit that referenced this issue May 22, 2012
Daniel verify Image Magick installed (only on Macs)
references #1511

Merges #1533
@radar radar added a commit that referenced this issue May 22, 2012
Daniel verify Image Magick installed (only on Macs)
references #1511

Merges #1533
@radar radar added a commit that referenced this issue May 29, 2012
Daniel verify Image Magick installed (only on Macs)
references #1511

Merges #1533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment