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
gem install spree
rails new mystore
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.
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 [firstname.lastname@example.org]
Admin Password [spree123]
run bundle install from "."
loading seed data
loading sample data
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!
/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
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.
Application Trace | Framework Trace | Full Trace
@headers="Content-Disposition: form-data; name=\"image[attachment]\"; filename=\"payment1.png\"\r\nContent-Type: image/png\r\n",
Show session dump
warden.user.user.key: ["Spree::User", , "X75BDvNe1TVKQLFk9ah9"]
Show env dump
Does the identify command work on the command line?
Here's what I get
dyld: Library not loaded: /usr/local/lib/liblcms2.2.dylib
Referenced from: /usr/local/bin/identify
Reason: image not found
 66867 trace trap identify
Alright, that looks like your imagemagick installation didn't go too well. I would suggest removing the homebrew version and compiling it from source.
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 !
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?
verify Image Magick installed (only on Macs)