I''m trying to setup paperclip with amazon s3so I can use photos on a
heroku app. I''m really struggling just getting it setup. I''m
just trying
the most basic example at the moment.
versions:
rails - 3.0.0 / ruby 1.8.7 / paperclip (2.3.4) / aws-s3 (0.6.2)
The error method I''m getting is ''undefined method
`stringify_keys''''
Here''s all my relevant code:
CODE
--------------------- Model
class AllEvent < ActiveRecord::Base
require ''paperclip''
#require ''aws-s3'' -
has_attached_file :photo,
:styles => {
:thumb=> "50x50#",
:small => "150x150>" },
:storage => :s3,
:s3_credentials => "#{Rails.root.to_s}/config/s3.yml",
:path => ":attachment/:id/:style.:extension",
:bucket => ''teneventsnewbucket''
-------------- Controller
class EdinburghController < ApplicationController
before_filter :authenticate, :except => [:index]
require ''nokogiri''
require ''open-uri''
require ''paperclip''
#require ''aws-s3''
def index
@title = "Edinburgh"
#start afresh each time, for test purposes
#delete_all_events
#to allow deleting events
@all_events = AllEvent.all
... end
----------------- View
.....
<% events_group.each do |event| %>
<tr>
<td><%=h image_tag event.photo.url(:thumb) %></td>
.....
[END OF CODE]
I''ve verified paperclip is working ok, if I remove the storage=> s3
line, all works fine.
The error method I''m getting is ''undefined method
`stringify_keys''''
Can anyone tell me where this method should be found? paperclip? aws-s3?
So I can try and work out where the problem might be coming from
I''ve commented out the ''require aws-s3'' line at the
top of model and
controller, leaving this in returns the error
"no such file to load -- aws-s3"
Is this a problem??
I''ve tried re installing aws-s3 using ''bundle
install'' and ''gem
install''.
Anyone else had similar issues?
--
Posted via http://www.ruby-forum.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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.