ActionView::TemplateError (undefined method `first' for nil:NilClass) on line #7 of vendor/plugins/flickr_sidebar/views/content.rhtml: 4: <% for pic in sidebar.flickr.choose(count.to_i) -%> 5:
<%= case format
6: when 'square':
7: link_to image_tag(pic.square, :alt => pic.title, :title => pic.title),pic.link
8: when 'rectangle':
9: link_to image_tag(pic.thumb, :alt => pic.title, :title => pic.title),pic.link
10: end
#{RAILS_ROOT}/vendor/plugins/flickr_sidebar/lib/flickr.rb:38:in `image'
#{RAILS_ROOT}/vendor/plugins/flickr_sidebar/lib/flickr.rb:44:in `square'
/home/matthewjrichards/mjr/vendor/plugins/flickr_sidebar/views/content.rhtml:7:in `_run_rhtml_47vendor47plugins47flickr_sidebar47views47content46rhtml'
/home/matthewjrichards/mjr/vendor/plugins/flickr_sidebar/views/content.rhtml:4:in `_run_rhtml_47vendor47plugins47flickr_sidebar47views47content46rhtml'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:326:in `compile_and_render_template'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:301:in `render_template_old'
#{RAILS_ROOT}/vendor/plugins/haml/lib/haml/template.rb:135:in `render_template'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:260:in `haml_old_render_file'
#{RAILS_ROOT}/vendor/plugins/haml/lib/haml/template.rb:120:in `render_file'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:806:in `render_file'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:738:in `render_with_no_layout'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/layout.rb:256:in `render_without_benchmark'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:50:in `render'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:50:in `render'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:786:in `render_to_string'
#{RAILS_ROOT}/vendor/rails/activesupport/lib/active_support/deprecation.rb:43:in `silence'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:786:in `render_to_string'
#{RAILS_ROOT}/app/helpers/articles_helper.rb:121:in `render_to_string'
#{RAILS_ROOT}/app/helpers/sidebar_helper.rb:24:in `render_sidebar'
#{RAILS_ROOT}/app/helpers/sidebar_helper.rb:7:in `render_sidebars'
#{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/base.rb:1355:in `inject'
#{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:123:in `method_missing'
#{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:98:in `method_missing'
#{RAILS_ROOT}/app/helpers/sidebar_helper.rb:3:in `render_sidebars'
#{RAILS_ROOT}/themes/matthewjrichards/layouts/default.rhtml:100:in `_run_rhtml_47themes47matthewjrichards47layouts47default46rhtml'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb:18:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/helpers/benchmark_helper.rb:18:in `benchmark'
#{RAILS_ROOT}/themes/matthewjrichards/layouts/default.rhtml:99:in `_run_rhtml_47themes47matthewjrichards47layouts47default46rhtml'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:326:in `compile_and_render_template'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:301:in `render_template_old'
#{RAILS_ROOT}/vendor/plugins/haml/lib/haml/template.rb:135:in `render_template'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:260:in `haml_old_render_file'
#{RAILS_ROOT}/vendor/plugins/haml/lib/haml/template.rb:120:in `render_file'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/layout.rb:254:in `render_without_benchmark'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:50:in `render'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:50:in `render'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:1096:in `perform_action_without_filters'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:632:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:634:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:600:in `proxy_before_and_after_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:470:in `call'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:600:in `proxy_before_and_after_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:470:in `call'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:438:in `call'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:438:in `call'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:438:in `call'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:438:in `call'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:438:in `call'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:449:in `call'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:600:in `proxy_before_and_after_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:470:in `call'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:637:in `call_filter'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/rescue.rb:83:in `perform_action'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:430:in `process_without_filters'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:624:in `process_without_session_management_support'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/session_management.rb:114:in `process'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:330:in `process'
#{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:41:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243
/usr/bin/mongrel_rails:18





