Actually no.. There is no problem with the data in my db that I can find. I tried ditching my data and started fresh, and this still occurs. Changing the timezone line in the environment file fixes that problem, but just leads me to this new one... I just updated to the edge branch today also and I am still running into this... I think it has to do with a bug in rails 2.2 since there are a couple posts I can find on google of people talking about similar issues, but I find it hard to believe that adding comments to other models works for other people and not me if that were the case... It's really strange that everything will work fine if I have the caching on, but breaks with it off...
On Feb 16, 1:31 pm, Bruno Bornsztein <[email protected]> wrote: > Weird. Just went back to your original message and noticed something. Here > was your error: > > You have a nil object when you didn't expect it! > You might have expected an instance of Array. > The error occurred while evaluating nil.include? > > Extracted source (around line #5): > > 2: %dt > 3: =time_ago_in_words_or_date( > activity.created_at) > 4: %dd > 5: =link_to activity.user.login.capitalize, user_path > > That nil.include? is coming from where you call > activity.user.login.capitalize. If the user doesn't have a login (maybe it > was an anonymous comment or something), then capitalize will result in that > error. Does that help? > > On Thu, Feb 12, 2009 at 6:11 PM, jdutil <[email protected]> wrote: > > > Thanks for the link Bruno it doesn't completely work out for me > > though, and I am not exactly sure why. That allows me to edit without > > restarting, but when I refresh the page it throws an error now. It > > may be that the caching stops my code from breaking or something I'm > > not sure. I added comments to a custom model, and if I implement that > > method the second time I view the page showing the comments it throws > > an error. The first time I view the page it works fine though... > > For some reason I seem to have shit luck at implementing comments on > > custom models since I went through similar issues before. Maybe you > > can help me figure this error out or give me the required steps for > > implementing comments on custom models incase I missed something, but > > I don't think I did since they were working fine before I upgraded to > > 2.2.2 > > > This link looks like it may be related: > >http://www.ruby-forum.com/topic/178391 > > > This is the error I get: > > NoMethodError > > > Extracted source (around line #4): > > > 1: -if comment.user > > 2: .hentry{:id => "comment_#{comment.id}"} > > 3: .vcard.author > > 4: %h5= link_to image_tag(comment.user.avatar_photo_url > > (:thumb), :height => '50', :width => '50', :alt => "# > > {comment.user.login}"), user_path(comment.user), :rel => > > 'bookmark', :class => 'photo', :title => "#{comment.user.login}'s > > profile" > > 5: %ul > > 6: %li.fn > > 7: = link_to comment.user.login, user_path > > (comment.user), :class => 'url' > > > Backtrace: > > Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > > associations/association_proxy.rb:209:in `method_missing' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > > renderable.rb:39:in `send' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > > renderable.rb:39:in `render' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > > renderable_partial.rb:20:in `render' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > benchmarking.rb:26:in `benchmark' > > /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/ > > core_ext/benchmark.rb:8:in `realtime' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > benchmarking.rb:26:in `benchmark' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > > renderable_partial.rb:19:in `render' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > > template.rb:73:in `render_template' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > > renderable_partial.rb:45:in `render_partial' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > > partials.rb:184:in `render_partial_collection' > > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > > associations/association_collection.rb:359:in `method_missing' > > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > > associations/association_proxy.rb:212:in `method_missing' > > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > > associations/association_proxy.rb:212:in `map' > > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > > associations/association_proxy.rb:212:in `send' > > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > > associations/association_proxy.rb:212:in `method_missing' > > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > > associations/association_collection.rb:359:in `method_missing' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > > partials.rb:179:in `render_partial_collection' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > > partials.rb:150:in `render_partial' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb: > > 258:in `render_without_haml' > > /Library/Ruby/Gems/1.8/gems/haml-2.0.6/lib/haml/helpers/ > > action_view_mods.rb:12:in `render' > > /Library/Ruby/Gems/1.8/gems/haml-2.0.6/lib/haml/helpers.rb:57:in > > `non_haml' > > /Library/Ruby/Gems/1.8/gems/haml-2.0.6/lib/haml/helpers/ > > action_view_mods.rb:12:in `render' > > app/views/places/show.html.haml:47 > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > > renderable.rb:39:in `send' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > > renderable.rb:39:in `render' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/ > > template.rb:73:in `render_template' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb: > > 256:in `render_without_haml' > > /Library/Ruby/Gems/1.8/gems/haml-2.0.6/lib/haml/helpers/ > > action_view_mods.rb:14:in `render' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb: > > 367:in `_render_with_layout' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_view/base.rb: > > 254:in `render_without_haml' > > /Library/Ruby/Gems/1.8/gems/haml-2.0.6/lib/haml/helpers/ > > action_view_mods.rb:14:in `render' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > base.rb:1174:in `render_for_file' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > base.rb:905:in `render_without_benchmark' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > benchmarking.rb:51:in `render' > > /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/ > > core_ext/benchmark.rb:8:in `realtime' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > benchmarking.rb:51:in `render' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > mime_responds.rb:135:in `send' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > mime_responds.rb:135:in `custom' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > mime_responds.rb:164:in `call' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > mime_responds.rb:164:in `respond' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > mime_responds.rb:158:in `each' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > mime_responds.rb:158:in `respond' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > mime_responds.rb:107:in `respond_to' > > app/controllers/places_controller.rb:35:in `show' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > base.rb:1253:in `send' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > base.rb:1253:in `perform_action_without_filters' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > filters.rb:617:in `call_filters' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > filters.rb:638:in `run_before_filters' > > /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/ > > callbacks.rb:178:in `send' > > /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/ > > callbacks.rb:178:in `evaluate_method' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > filters.rb:186:in `call' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > filters.rb:635:in `run_before_filters' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > filters.rb:615:in `call_filters' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > filters.rb:610:in `perform_action_without_benchmark' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > benchmarking.rb:68:in `perform_action_without_rescue' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > benchmarking.rb:68:in `perform_action_without_rescue' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > rescue.rb:136:in `perform_action_without_caching' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > caching/sql_cache.rb:13:in `perform_action' > > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > > connection_adapters/abstract/query_cache.rb:34:in `cache' > > /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ > > query_cache.rb:8:in `cache' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > caching/sql_cache.rb:12:in `perform_action' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > base.rb:524:in `send' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > base.rb:524:in `process_without_filters' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > filters.rb:606:in `process_without_session_management_support' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > session_management.rb:134:in `sass_old_process' > > /Library/Ruby/Gems/1.8/gems/haml-2.0.6/lib/sass/plugin/rails.rb:19:in > > `process' > > /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ > > base.rb:392:in `process' > > /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in > > `process' > > /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in > > `synchronize' > > /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in > > `process' > > /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in > > `process_client' > > ... > > read more » --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
