Anyone else had similar issues recently?

I saw this old ticket (which I've updated):
https://github.com/spree/spree/issues/1195

...but, tried a few things. Blew the server away and reinstalled from
scratch by hand. No luck.

Images work in dev, but I just get broken thumbnails on production.
I've created a demo site on EC2 here demo'ing the issue:
http://54.242.65.143/

As I've noted in the github ticket:

1) My image magik install is fine.

2) The image *was* successfully uploaded and split into various sub-assets,
and downloading the assets works fine.

I initially thought this was a screw up of my nginx config, but the default
spree configuration reads:

location ~ ^/(system|assets)/ {
root /home/spree/Shop/current/public;
expires max;
break;
}

ie. An image,
eg. http://54.242.65.143/spree/products/1/small/imgres.jpg?1357796848 isn't
being handled by nginx, its being handled by the application itself.

Any ideas what's going on?

Is this working for everyone else?

Note that this is *not* using S3, it's using a local filestore.

~
Doug.

--

Search Discussions

  • Nate Lowrie at Jan 11, 2013 at 7:07 pm
    Doug,

    If you've uploaded your images in development, they will be stored in the
    public folder, which isn't a part of the asset pipeline. This folder is on
    your local development system and doesn't normally get copied over to the
    production system. Please check your production rails app and verify that
    the image path and image exists. The simplest trick is to copy that image
    directory tree down onto production. I recommend only uploading images
    used on production through the production admin interface.

    Regards,

    Nate
    On Thursday, January 10, 2013 7:33:42 PM UTC-5, Doug Linder wrote:

    Anyone else had similar issues recently?

    I saw this old ticket (which I've updated):
    https://github.com/spree/spree/issues/1195

    ...but, tried a few things. Blew the server away and reinstalled from
    scratch by hand. No luck.

    Images work in dev, but I just get broken thumbnails on production.
    I've created a demo site on EC2 here demo'ing the issue:
    http://54.242.65.143/

    As I've noted in the github ticket:

    1) My image magik install is fine.

    2) The image *was* successfully uploaded and split into various
    sub-assets, and downloading the assets works fine.

    I initially thought this was a screw up of my nginx config, but the
    default spree configuration reads:

    location ~ ^/(system|assets)/ {
    root /home/spree/Shop/current/public;
    expires max;
    break;
    }

    ie. An image, eg.
    http://54.242.65.143/spree/products/1/small/imgres.jpg?1357796848 isn't
    being handled by nginx, its being handled by the application itself.

    Any ideas what's going on?

    Is this working for everyone else?

    Note that this is *not* using S3, it's using a local filestore.

    ~
    Doug.
    --
  • Doug Linder at Jan 12, 2013 at 3:25 pm
    I've fixed the issue on my server; the nginx configuration was not set to
    server the /public/ folder correctly. The documentation has now been
    updated to reflect this is required.

    For anyone else experiencing this issue in the future:

    If you're images don't work, make sure your server (nginx or apache) is
    serving the public/ folder of your application. This isn't really mentioned
    clearly in the documentation about deploying in product, but its a general
    rails thing you need to watch out for.

    You'll notice in your error logs details about not being able to see your
    favicon.ico or robots.txt file as well; that's a syntom of the same issue.

    ~
    Doug.
    On Saturday, January 12, 2013 3:07:09 AM UTC+8, Nate Lowrie wrote:

    Doug,

    If you've uploaded your images in development, they will be stored in the
    public folder, which isn't a part of the asset pipeline. This folder is on
    your local development system and doesn't normally get copied over to the
    production system. Please check your production rails app and verify that
    the image path and image exists. The simplest trick is to copy that image
    directory tree down onto production. I recommend only uploading images
    used on production through the production admin interface.

    Regards,

    Nate
    On Thursday, January 10, 2013 7:33:42 PM UTC-5, Doug Linder wrote:

    Anyone else had similar issues recently?

    I saw this old ticket (which I've updated):
    https://github.com/spree/spree/issues/1195

    ...but, tried a few things. Blew the server away and reinstalled from
    scratch by hand. No luck.

    Images work in dev, but I just get broken thumbnails on production.
    I've created a demo site on EC2 here demo'ing the issue:
    http://54.242.65.143/

    As I've noted in the github ticket:

    1) My image magik install is fine.

    2) The image *was* successfully uploaded and split into various
    sub-assets, and downloading the assets works fine.

    I initially thought this was a screw up of my nginx config, but the
    default spree configuration reads:

    location ~ ^/(system|assets)/ {
    root /home/spree/Shop/current/public;
    expires max;
    break;
    }

    ie. An image, eg.
    http://54.242.65.143/spree/products/1/small/imgres.jpg?1357796848 isn't
    being handled by nginx, its being handled by the application itself.

    Any ideas what's going on?

    Is this working for everyone else?

    Note that this is *not* using S3, it's using a local filestore.

    ~
    Doug.
    --
  • Jason Rylance at Feb 17, 2013 at 11:49 pm
    This problem was remedied by by changing the `location` line to this:

    location ~ ^/(spree|system|assets)/ {

    "This is because the assets are located at the public root inside the
    "spree" directory. "system" is where typical Paperclip uploads go, and
    assets are for the Rails assets."
    On Sunday, February 17, 2013 5:21:24 PM UTC-6, Jason Rylance wrote:

    I appear to be having a similar issue as discussed here<https://groups.google.com/forum/?fromgroups=#!topic/spree-user/q8sy2wuNrXI>.
    Can you explain exactly how you set up your server to serve the /public/
    folder ?

    I currently am using:

    location ~ ^/(system|assets)/ {
    root /home/spree/angel_wood/current/public;
    expires max;
    break;
    }

    . . . which serves everything but my product images (I get warnings about
    favicon missing and other similar warnings as you described).

    On Saturday, January 12, 2013 9:25:37 AM UTC-6, Doug Linder wrote:

    I've fixed the issue on my server; the nginx configuration was not set to
    server the /public/ folder correctly. The documentation has now been
    updated to reflect this is required.

    For anyone else experiencing this issue in the future:

    If you're images don't work, make sure your server (nginx or apache) is
    serving the public/ folder of your application. This isn't really mentioned
    clearly in the documentation about deploying in product, but its a general
    rails thing you need to watch out for.

    You'll notice in your error logs details about not being able to see your
    favicon.ico or robots.txt file as well; that's a syntom of the same issue.

    ~
    Doug.
    On Saturday, January 12, 2013 3:07:09 AM UTC+8, Nate Lowrie wrote:

    Doug,

    If you've uploaded your images in development, they will be stored in
    the public folder, which isn't a part of the asset pipeline. This folder
    is on your local development system and doesn't normally get copied over to
    the production system. Please check your production rails app and verify
    that the image path and image exists. The simplest trick is to copy that
    image directory tree down onto production. I recommend only uploading
    images used on production through the production admin interface.

    Regards,

    Nate
    On Thursday, January 10, 2013 7:33:42 PM UTC-5, Doug Linder wrote:

    Anyone else had similar issues recently?

    I saw this old ticket (which I've updated):
    https://github.com/spree/spree/issues/1195

    ...but, tried a few things. Blew the server away and reinstalled from
    scratch by hand. No luck.

    Images work in dev, but I just get broken thumbnails on production.
    I've created a demo site on EC2 here demo'ing the issue:
    http://54.242.65.143/

    As I've noted in the github ticket:

    1) My image magik install is fine.

    2) The image *was* successfully uploaded and split into various
    sub-assets, and downloading the assets works fine.

    I initially thought this was a screw up of my nginx config, but the
    default spree configuration reads:

    location ~ ^/(system|assets)/ {
    root /home/spree/Shop/current/public;
    expires max;
    break;
    }

    ie. An image, eg.
    http://54.242.65.143/spree/products/1/small/imgres.jpg?1357796848isn't being handled by nginx, its being handled by the application itself.

    Any ideas what's going on?

    Is this working for everyone else?

    Note that this is *not* using S3, it's using a local filestore.

    ~
    Doug.
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedJan 11, '13 at 2:19p
activeFeb 17, '13 at 11:49p
posts4
users3
websitespreecommerce.com
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase