Sorry for the delay. to fix the issue i had to set the config.cache_classes = true
in my applications /config/environments/development.rb file I was also seeing an issue where i'd load a page, then reload the same page, and would get a NoMethod error. That's what lead me to this solution via google. since making this change, all is well in my land. -- Levi Rosol Twitter: @LeviRosol On Wed, Jul 15, 2009 at 6:26 PM, Levi Rosol <[email protected]> wrote: > I had this same issue, and the fix is to change a class caching flag > in one of the configs to false I believe. On my phone right now, but > will get you the specific answer in the next hour when I get to my PC > > On 7/15/09, SimianLogic <[email protected]> wrote: > > > > I ran into this today--did you ever find a fix for it? On my install, > > everything works great the first page load and then s3_config goes > > AWOL on each page load after that. > > > > Thanks, > > -Will > > > > On Jun 8, 12:48 pm, Mike Muldoon <[email protected]> wrote: > >> Moar data. I set a breakpoint in s3_backend.rb, in s3_url(). The > >> s3_config hash is set correctly there, but when the class method > >> self.protocol() is called, it is not available: > >> > >> (rdb:10) list > >> [245, 254] in /home/muldoon/rails/omni/vendor/plugins/community_engine/ > >> plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/ > >> s3_backend.rb > >> 245 # set using the configuration parameters in > >> <tt>RAILS_ROOT/config/amazon_s3.yml</tt>. > >> 246 # > >> 247 # The optional thumbnail argument will output the > >> thumbnail's filename (if any). > >> 248 def s3_url(thumbnail = nil) > >> 249 debugger > >> => 250 File.join(s3_protocol + s3_hostname + > >> s3_port_string, bucket_name, full_filename(thumbnail)) > >> 251 end > >> 252 alias :public_filename :s3_url > >> 253 > >> 254 # All private objects are accessible via an > >> authenticated GET request to the S3 servers. You can generate an > >> (rdb:10) s3_config > >> {:use_persistent=>true, :bucket_name=>"inf-dev- > >> bucket", :access_key_id=>"AKIAJ4F5NOJ3LGKKZGRQ", > >> :secret_access_key=>"C6lvxj/ > >> NGleUpdNYeinykow6S0fHBfE9rMT28YdL"} > >> (rdb:10) step > >> /home/muldoon/rails/omni/vendor/plugins/community_engine/plugins/ > >> attachment_fu/lib/technoweenie/attachment_fu/backends/s3_backend.rb: > >> 294 > >> Technoweenie::AttachmentFu::Backends::S3Backend.protocol > >> (rdb:10) list > >> [289, 298] in /home/muldoon/rails/omni/vendor/plugins/community_engine/ > >> plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/ > >> s3_backend.rb > >> 289 def current_data > >> 290 S3Object.value full_filename, bucket_name > >> 291 end > >> 292 > >> 293 def s3_protocol > >> => 294 > >> Technoweenie::AttachmentFu::Backends::S3Backend.protocol > >> 295 end > >> 296 > >> 297 def s3_hostname > >> 298 > >> Technoweenie::AttachmentFu::Backends::S3Backend.hostname > >> (rdb:10) Technoweenie::AttachmentFu::Backends::S3Backend.protocol > >> NameError Exception: undefined local variable or method `s3_config' > >> for Technoweenie::AttachmentFu::Backends::S3Backend:Module > >> > >> On Jun 8, 11:53 am, mike muldoon <[email protected]> wrote: > >> > >> > Hello all, > >> > >> > After enabling s3 for photos, I'm getting an "undefined local variable > >> > or method `s3_config' " error. For example: > >> > >> > ActionView::TemplateError (undefined local variable or method > >> > `s3_config' for > >> > Technoweenie::AttachmentFu::Backends::S3Backend:Module) on line #13 of > >> > > vendor/plugins/community_engine/app/views/users/welcome_about.html.haml: > >> > 10: %br > >> > 11: = link_to "» " + :go_to_your_profile.l, > user_path(@user) > >> > 12: > >> > 13: - if @user.avatar_photo_url > >> > 14: .box.alt > >> > 15: %h3=:your_profile_photo.l > >> > 16: .centered > >> > >> > The s3 file upload works, I can see it in the appropriate bucket. My > >> > steps to activate s3 were: > >> > >> > 1. create config/amazon_s3.yml > >> > 2. copy the photo block out of > >> > vendor/plugin/community_engine/config/application.yml > >> > into > >> > config/application.yml, and set > >> > storage: 's3' > >> > >> > The aws-s3 gem is in place: > >> > muld...@fedora$ gem list > >> > >> > *** LOCAL GEMS *** > >> > >> > actionmailer (2.3.2, 2.2.2, 2.1.0) > >> > actionpack (2.3.2, 2.2.2, 2.1.0) > >> > activerecord (2.3.2, 2.2.2, 2.1.0) > >> > activeresource (2.3.2, 2.2.2, 2.1.0) > >> > activesupport (2.3.2, 2.2.2, 2.1.0) > >> > aws-s3 (0.6.2) > >> > <snip> > >> > >> > Any suggestions? > >> > Mike > > > > > > > > -- > Sent from my mobile device > > -- > Levi Rosol > Twitter: @LeviRosol > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CommunityEngine" 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 this group at http://groups.google.com/group/communityengine?hl=en -~----------~----~----~----~------~----~------~--~---
