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

  • SEARCH
  • Home
  • 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 8383993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:18:14+00:00 2026-06-09T17:18:14+00:00

I was doing some image optimization on my site. Things are working awesome on

  • 0

I was doing some image optimization on my site. Things are working awesome on development machine but in production mode I am getting an error ie:

ActionView::Template::Error (can't dup Symbol):

This is happening only in case of aws, If I remove this then things working perfectly fine:

A code I was using and was working perfectly:

  has_attached_file :attachment, {
             :styles => { 
                 :medium=>"654x346>",
                 :small => "260x400>",
                 :thumb => "75x75#",
                 :facebook_meta_tag => "200x200#" 
                 }, :include_updated_timestamp => false
             }.merge(PAPERCLIP_STORAGE_OPTIONS)

But now I modified this and Its working perfectly fine in development environment but not working on production environment.

has_attached_file :attachment,
   :styles => {
     :medium => {
       :geometry => "654x346>",
       :quality => 60,
       :format => 'JPG'
     },
     :small => {
       :geometry => "260x400>",
       :quality => 60,
       :format => 'JPG'
     },
     :thumb => {
       :geometry =>"75x75#",
       :quality => 60,
       :format => 'JPG'
     },
     :facebook_meta_tag => {
       :geometry =>"200x200#",
       :quality => 50,
       :format => 'JPG'
     }
     }.merge(PAPERCLIP_STORAGE_OPTIONS)

Other relevant settings:

 PAPERCLIP_STORAGE_OPTIONS = {
      :storage => :s3, 
      :s3_credentials => "#{Rails.root}/config/amazons3.yml",
}

amazons3.yml

production:
   access_key_id: XXXXxxxXXXXxxx
   secret_access_key: XXXXxxxXXXXxxxXXXXxxxXXXXxxxXXXXxxxXXXXxxx
   bucket: images.XXXXxxx.com
  • 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-09T17:18:15+00:00Added an answer on June 9, 2026 at 5:18 pm

    Here is the working code:

      has_attached_file :attachment, {
           :styles => {
             :medium => ["654x346>", :jpg],
             :small => ["260x400>", :jpg], 
             :thumb => ["75x75#", :jpg],
             :facebook_meta_tag =>["200x200#", :jpg] 
             }, 
              :convert_options => {
                 :medium => "-quality 60",
                 :small => "-quality 60",
                 :thumb => "-quality 60",
                 :facebook_meta_tag => "-quality 60" 
                 } 
              }.merge(PAPERCLIP_STORAGE_OPTIONS)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem I'm doing some maintenance and changes on a Drupal site, but I'm not
I am doing some image processing code in C#, but I cant use any
I am doing a painting app. In that, I draw some image. But I
I am doing some image sampling. What my question is, is there a 'crosshair'
All, I'm doing some image manipulation in Scala by making use of BufferedImages and
I am just doing some research into image processing and would appreciate it if
I'm trying to display an image while I'm doing some Ajax updating (which I've
I'm doing some maintenance work on somebody else's site and there's an IE 9
After doing some processing on an audio or image array, it needs to be
Am working with django 1.3 and doing some template inheritance. My /static/ settings path

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.