Product images won't upload on heroku.

248 views
Skip to first unread message

Stevie

unread,
Jul 19, 2012, 2:27:14 AM7/19/12
to ror_ec...@googlegroups.com
Product image won't upload. Everything seems to precompile fine when I run heroku  
rake asset:precompile and git push heroku master. 
But it just won't upload product images. 
So I checked the paperclip doc and found this command :
rake paperclip:refresh:missing_styles
and this is what I get when I run the command: 
Regenerating Image -> photo -> [:large, :mini, :product, :small]
rake aborted!
/var/folders/5_/ycctjw8j1b3gl4xwfdjrpjd40000gn/T/Screen Shot 2012-07-04 at 5.09.38 PM20120719-5334-rgyknm.png is not recognized by the 'identify' command.

Tasks: TOP => paperclip:refresh:missing_styles
(See full trace by running task with --trace)

My client is leaving the country soon and this issue really bothers me. Thanks!

David Henner

unread,
Jul 19, 2012, 8:03:05 AM7/19/12
to ror_ec...@googlegroups.com
Heroku requires that you put images on S3.  Is that the issue?

Steven

unread,
Jul 19, 2012, 1:59:12 PM7/19/12
to ror_ec...@googlegroups.com
I'm not sure. Everything else is uploaded in the bucket and looks fine in production except for the product images.
This is the link to the website
https://wildone.herokuapp.com
I followed everything on your wiki page and I'm using ruby 1.92 and rails 3.2.6.
thank you

David Henner

unread,
Jul 19, 2012, 2:50:35 PM7/19/12
to ror_ec...@googlegroups.com
I'll take a deeper dive in a few hours...  I'm a bit busy at work right now.

I'm guessing there is something simple. 

One question...  Did you load the images from https://wildone.herokuapp.com or from your local machine?  Go into the admin and add an image for a product.  The images aren't precompiled.  They are directly uploaded from the app.

Dave

Steven

unread,
Jul 19, 2012, 4:01:57 PM7/19/12
to ror_ec...@googlegroups.com
I loaded the images from my local machine. And surprisingly, I couldn't change anything about my products online. I tried to add a product type and a brand and they both worked. But I couldn't  create a new product or upload a image. Here's the logs

2012-07-19T19:38:16+00:00 app[web.1]: Started GET "/admin/merchandise/products/dsif/edit" for 24.62.60.197 at 2012-07-19 19:38:16 +0000
2012-07-19T19:38:17+00:00 heroku[router]: GET wildone.herokuapp.com/admin/merchandise/products/dsif/edit dyno=web.1 queue=0 wait=0ms service=252ms status=200 bytes=9729
2012-07-19T19:38:34+00:00 app[web.1]:
2012-07-19T19:38:34+00:00 app[web.1]:
2012-07-19T19:38:34+00:00 app[web.1]: Started GET "/admin/merchandise/images/products/dsif/edit" for 24.62.60.197 at 2012-07-19 19:38:34 +0000
2012-07-19T19:38:34+00:00 heroku[router]: GET wildone.herokuapp.com/admin/merchandise/images/products/dsif/edit dyno=web.1 queue=0 wait=0ms service=116ms status=304 bytes=0
2012-07-19T19:38:58+00:00 app[web.1]:
2012-07-19T19:38:58+00:00 app[web.1]: Started PUT "/admin/merchandise/images/products/dsif" for 24.62.60.197 at 2012-07-19 19:38:58 +0000
2012-07-19T19:38:58+00:00 app[web.1]:
2012-07-19T19:39:03+00:00 heroku[router]: POST wildone.herokuapp.com/admin/merchandise/images/products/dsif dyno=web.1 queue=0 wait=0ms service=7607ms status=500 bytes=728
2012-07-19T19:39:03+00:00 app[web.1]:
2012-07-19T19:39:03+00:00 app[web.1]: Errno::ECONNREFUSED (Connection refused - connect(2)):
2012-07-19T19:39:03+00:00 app[web.1]:
2012-07-19T19:39:03+00:00 app[web.1]:   app/controllers/admin/merchandise/images/products_controller.rb:10:in `update'
2012-07-19T19:39:03+00:00 app[web.1]:

I found that searching wasn't working either. So I ran  heroku rake sunspot:solr:start  but that couldn't solve the problem

Steven

unread,
Jul 19, 2012, 5:28:41 PM7/19/12
to ror_ec...@googlegroups.com
Problem solved. I turned off solr search. Thank you.


On 7/19/12 2:50 PM, David Henner wrote:

Steven

unread,
Jul 19, 2012, 8:09:23 PM7/19/12
to ror_ec...@googlegroups.com
One more question. Heroku won't display one of my stylesheets. It works fine on my local machine but on heroku it just shows the page without css. Thanks


On 7/19/12 2:50 PM, David Henner wrote:

David Henner

unread,
Jul 19, 2012, 10:49:57 PM7/19/12
to ror_ec...@googlegroups.com
Yeah that is a weird thing with css.  You need to go to config/environments/production.rb.  Take a look at line 22...

config.assets.precompile

and add the stylesheet.  BTW is one of my stylesheets?

Dave

Steven Wang

unread,
Jul 19, 2012, 11:15:52 PM7/19/12
to ror_ec...@googlegroups.com
No, all your stylesheets precompiles fine! 

Sent from my iPad
Reply all
Reply to author
Forward
0 new messages