I provide all keys but not working. In development working well
*In my model*
has_attached_file :crop_content, :styles => {:thumb =>
"89x75#",:crop_content=>"160x160#" },
:path => "assets/crops/contents/:id/:style/:basename.:extension",
:storage => "s3",
#:s3_headers => { 'Cache-Control' => 'max-age=315576000', 'Expires' =>
10.years.from_now.httpdate },
:s3_protocol => 'https',
:s3_credentials => "#{::Rails.root.to_s}/config/amazon-s3.yml"
*and under config folder/amazon-s3.yml*
development:
bucket: my_avatar-production
access_key_id: amazonaccesskey
secret_access_key: amazon_secret_access_key
test:
bucket: my_avatar-test
access_key_id: amazonaccesskey
secret_access_key: amazon_secret_access_key
production:
bucket: my_avatar-production
access_key_id: amazonaccesskey
secret_access_key: amazon_secret_access_key
On Thu, Sep 13, 2012 at 1:44 PM, Jim Ruther Nill <[email protected]> wrote:
>
>
> On Thu, Sep 13, 2012 at 6:07 PM, Saravanan P
> <[email protected]>wrote:
>
>> Thanks for the reply.
>>
>> This is from my .log file
>>
>> Started GET "/" for 122.183.133.1 at 2012-09-13 07:38:52 +0000
>> Processing by HomeController#index as HTML
>> [1m [36mProduct Load (1.3ms) [0m [1mSELECT id, product_type, name,
>> slug, short_description, price, farm_name, lbcount, unit FROM `products`
>> WHERE (featured_product=1) ORDER BY rand() LIMIT 20 [0m
>> [paperclip] Duplicate URL for attachment with
>> /system/:attachment/:id/:style/:filename. This will clash with attachment
>> defined in Advertisement class
>> [1m [35mCategoryImage Load (0.9ms) [0m SELECT `category_images`.* FROM
>> `category_images` WHERE `category_images`.`product_id` IN (43, 40, 88, 54,
>> 158, 150, 57, 70, 109)
>> [1m [36mCategory Load (1.0ms) [0m [1mSELECT `categories`.* FROM
>> `categories` WHERE `categories`.`id` IN (8, 2, 4, 9, 5, 10, 11, 6) [0m
>> [1m [35mPicture Load (12.3ms) [0m SELECT `pictures`.* FROM `pictures`
>> WHERE `pictures`.`imageable_type` = 'Product' AND `pictures`.`imageable_id`
>> IN (43, 40, 88, 54, 158, 150, 57, 70, 109)
>> [1m [36mCompany Load (1.0ms) [0m [1mSELECT `companies`.* FROM
>> `companies` WHERE (name IN ('Fresh goat cheese','Scallops','Maine
>> lobsters','Fresh peaches','Teas')) ORDER BY rand() [0m
>> [1m [35mProduct Load (0.7ms) [0m SELECT id, product_type, name, slug,
>> short_description, price, farm_name, lbcount, unit FROM `products` WHERE
>> (featured_product = 0 and new_product= 1) ORDER BY rand() LIMIT 20
>> [1m [36mCategoryImage Load (0.6ms) [0m [1mSELECT `category_images`.*
>> FROM `category_images` WHERE `category_images`.`product_id` IN (119, 31,
>> 84, 51, 120, 154, 103, 37, 56, 130, 148) [0m
>> [1m [35mCategory Load (0.6ms) [0m SELECT `categories`.* FROM
>> `categories` WHERE `categories`.`id` IN (14, 5, 13, 9, 2, 0, 7, 4, 17)
>> [1m [36mPicture Load (1.3ms) [0m [1mSELECT `pictures`.* FROM
>> `pictures` WHERE `pictures`.`imageable_type` = 'Product' AND
>> `pictures`.`imageable_id` IN (119, 31, 84, 51, 120, 154, 103, 37, 56, 130,
>> 148) [0m
>> [1m [35mThought Load (0.2ms) [0m SELECT `thoughts`.* FROM `thoughts`
>> ORDER BY created_at DESC LIMIT 1
>> [1m [36mLearn Load (0.2ms) [0m [1mSELECT `learns`.* FROM `learns`
>> ORDER BY created_at DESC LIMIT 2 [0m
>> [paperclip] Duplicate URL for attachment with
>> /system/:attachment/:id/:style/:filename. This will clash with attachment
>> defined in Category class
>> [1m [35mAdvertisement Load (0.2ms) [0m SELECT `advertisements`.* FROM
>> `advertisements` ORDER BY created_at desc LIMIT 1
>> [1m [36mNews Load (0.2ms) [0m [1mSELECT `news`.* FROM `news` ORDER BY
>> created_at DESC LIMIT 1 [0m
>> [1m [35mBlog Load (0.2ms) [0m SELECT `blogs`.* FROM `blogs` ORDER BY
>> created_at DESC LIMIT 1
>> Rendered home/index.html.haml within layouts/application (3.0ms)
>> Completed 500 Internal Server Error in 359ms
>>
>> ActionView::Template::Error (You did not provide both required access
>> keys. Please provide the access_key_id and the secret_access_key.):
>> 267: .img_col1
>> 268:
>> .capslide_img_cont1.ic_container{:style=>"position:absolute;"}
>> 269: %a{:href => "/product_details" +
>> "?category_id=#{@cate.category.slug}" + "&product_id=#{x.slug} "}
>> 270: %img{:alt =>
>> "product",:src=>"#{i.image.url(:products)}", :width => "329" , :height
>> =>"251"}
>> 271: .ic_caption{:style => "display: block;"}
>>
>> 272: .overlay-text
>> 273: %a{:href => "/product_details" +
>> "?category_id=#{@cate.category.slug}" + "&product_id=#{x.slug} "}
>> app/views/home/index.html.haml:270:in `block in
>> _app_views_home_index_html_haml___1026580395_93166550'
>> app/views/home/index.html.haml:262:in `each'
>> app/views/home/index.html.haml:262:in
>> `_app_views_home_index_html_haml___1026580395_93166550'
>>
>
> Looks like it has something to do with you s3 credentials. Searching for
> the complete error tells you this.
>
>
> https://www.google.com/webhp?sourceid=chrome-instant&ie=UTF-8#hl=en&safe=off&sclient=psy-ab&q=%22You+did+not+provide+both+required+access+keys.+Please+provide+the+access_key_id+and+the+secret_access_key%22&oq=%22You+did+not+provide+both+required+access+keys.+Please+provide+the+access_key_id+and+the+secret_access_key%22&gs_l=hp.3...2428.3001.1.3258.2.2.0.0.0.0.0.0..0.0...0.2...1c.1.ywAFlQv0Z_s&pbx=1&fp=1&biw=1366&bih=622&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&cad=b
>
>
>>
>>
>> Note: Some of the page running which looks like static page content.
>>
>>
>> On Thu, Sep 13, 2012 at 1:31 PM, Colin Law <[email protected]>wrote:
>>
>>> On 13 September 2012 08:53, Saravanan P <[email protected]>
>>> wrote:
>>> > I am getting following error while run my rails app in my server
>>> >
>>> > ActionView::Template::Error (You did not provide both required access
>>> keys.
>>> > Please provide the access_key_id and the secret_access_key.):
>>>
>>> I think you may need to give us some more information about the code
>>> that generates the error.
>>>
>>> Colin
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Ruby on Rails: Talk" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>> --
>> Regards by
>> Saravanan.P
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> -------------------------------------------------------------
> visit my blog at http://jimlabs.heroku.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
Regards by
Saravanan.P
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.