I''ve spent at least 2 hours on this one problem. On my local machine in my controller I have this: def new @page_title = "New User" @user = User.new @photo = Photo.new end All is good. Now, on the remote server I get an error when accessing the ''new'' view. If I remove @photo = Photo.new from the controller then the error goes away. This same error is also happening on the create method, even though it is the exact same code on my local machine. Here is the error: NoMethodError in UsersController#new You have a nil object when you didn''t expect it! The error occurred while evaluating nil.symbolize_keys #{RAILS_ROOT}/vendor/plugins/attachment_fu/lib/technoweenie/ attachment_fu/backends/s3_backend.rb:136:in `included'' #{RAILS_ROOT}/vendor/plugins/attachment_fu/lib/technoweenie/ attachment_fu.rb:79:in `include'' #{RAILS_ROOT}/vendor/plugins/attachment_fu/lib/technoweenie/ attachment_fu.rb:79:in `has_attachment'' #{RAILS_ROOT}/app/models/photo.rb:9 #{RAILS_ROOT}/app/controllers/users_controller.rb:96:in `new'' --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I thought maybe the server cannot find my amazon_s3.yml file so I added this attachment_fu option to the model: :storage => :s3, :s3_config_path => (RAILS_ROOT + ''/config/ amazon_s3.yml''), But, same error :-( --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Did you solve this problem? I get this error when switching to production and not in development. jko170 wrote:> I thought maybe the server cannot find my amazon_s3.yml file so I > added this attachment_fu option to the model: > > :storage => :s3, :s3_config_path => (RAILS_ROOT + ''/config/ > amazon_s3.yml''), > > But, same error :-(-- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Make sure you have credentials in your amazon_s3.yml file setup for that environment -- production: ... Navin Samuel wrote:> > Did you solve this problem? I get this error when switching to > production and not in development. > > > jko170 wrote: >> I thought maybe the server cannot find my amazon_s3.yml file so I >> added this attachment_fu option to the model: >> >> :storage => :s3, :s3_config_path => (RAILS_ROOT + ''/config/ >> amazon_s3.yml''), >> >> But, same error :-(-- Posted via http://www.ruby-forum.com/.