Dear board, I am running a fork of a quite large Rails 2.3.5 app (lots
of plugins etc.). It has worked before and I know it works on my
colleague''s machine. I''m not sure where to begin
troubleshooting this
though (I can''t find much good Rails troubleshooting material
anywhere!). Can anyone help? Thanks in advance.
Browser output:
NoMethodError in Home#index
Showing app/views/home/index.html.erb where line #11 raised:
undefined method `alternative_url'' for #<NewsItem:0x50cae18>
Extracted source (around line #11):
8: :width => 499,
9: :height => 281,
10: :version => "9",
11: :flashvars =>
front_page_panel_flashvars(@featured_panels),
12: :params => {:allowScriptAccess => "always",
:bgcolor
=> "1C1C1C", :wmode => "transparent"},
13: :alt =>
(link_to(image_tag(@featured_panels.first.try(:image_path), :width =>
499, :height => 281), @featured_panels.first.try(:path)) unless
@featured_panels.empty?)
14: %>
RAILS_ROOT: /Users/matthew/Code/maloca
Application Trace | Framework Trace | Full Trace
/Users/matthew/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:260:in
`method_missing''
/Users/matthew/Code/maloca/app/models/news_item.rb:91:in `path''
/Users/matthew/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:217:in
`send''
/Users/matthew/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:217:in
`method_missing''
/Users/matthew/Code/maloca/app/helpers/home_helper.rb:4:in
`front_page_panel_flashvars''
/Users/matthew/Code/maloca/app/helpers/home_helper.rb:4:in `map''
/Users/matthew/Code/maloca/app/helpers/home_helper.rb:4:in
`front_page_panel_flashvars''
/Users/matthew/Code/maloca/app/views/home/index.html.erb:11:in
`_run_erb_app47views47home47index46html46erb''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_view/renderable.rb:34:in
`send''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_view/renderable.rb:34:in
`render_without_trace_View_path_r_2_Rendering''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:306:in
`with_template''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_view/renderable.rb:30:in
`render_without_trace_View_path_r_2_Rendering''
/Users/matthew/Code/maloca/vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/agent/method_tracer.rb:319:in
`render''
/Users/matthew/Code/maloca/vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/agent/method_tracer.rb:141:in
`trace_execution_scoped''
/Users/matthew/Code/maloca/vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/agent/method_tracer.rb:314:in
`render''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_view/template.rb:205:in
`render_template''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:265:in
`render''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:348:in
`_render_with_layout''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_view/base.rb:262:in
`render''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:1250:in
`render_for_file''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:945:in
`render_without_benchmark''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:51:in
`render''
/Users/matthew/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in
`ms''
/Users/matthew/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:10:in
`realtime''
/Users/matthew/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in
`ms''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:51:in
`render''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:1326:in
`default_render''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:1332:in
`perform_action_without_filters''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:617:in
`call_filters''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:610:in
`perform_action_without_benchmark''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in
`perform_action_without_rescue''
/Users/matthew/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in
`ms''
/Users/matthew/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:10:in
`realtime''
/Users/matthew/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in
`ms''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in
`perform_action_without_rescue''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/rescue.rb:160:in
`perform_action_without_flash''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/flash.rb:146:in
`perform_action_without_newrelic_trace''
/Users/matthew/Code/maloca/vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:254:in
`perform_action''
/Users/matthew/Code/maloca/vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/agent/method_tracer.rb:141:in
`trace_execution_scoped''
/Users/matthew/Code/maloca/vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:247:in
`perform_action''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in
`send''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in
`process_without_filters''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:606:in
`process''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:391:in
`process''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:386:in
`call''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:437:in
`call''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:87:in
`dispatch''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:121:in
`_call''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:130:in
`build_middleware_stack''
/Users/matthew/Code/maloca/vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/rack/developer_mode.rb:20:in
`call''
/Users/matthew/Code/maloca/vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/rack/developer_mode.rb:20:in
`call''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in
`call''
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call''
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in
`call''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:15:in
`call''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/session/abstract_store.rb:122:in
`call''
/Users/matthew/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:29:in
`call''
/Users/matthew/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in
`cache''
/Users/matthew/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:9:in
`cache''
/Users/matthew/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:28:in
`call''
/Users/matthew/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in
`call''
/Users/matthew/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active_support/cache/strategy/local_cache.rb:24:in
`call''
/Users/matthew/Code/maloca/vendor/gems/hoptoad_notifier-2.3.8/lib/hoptoad_notifier/rack.rb:27:in
`call''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in
`call''
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call''
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in
`synchronize''
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:114:in
`call''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/reloader.rb:34:in
`run''
/Users/matthew/.gem/ruby/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:108:in
`call''
/Users/matthew/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in
`call''
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call''
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each''
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call''
/Users/matthew/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:17:in
`call''
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:13:in
`call''
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/chunked.rb:15:in `call''
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:64:in
`process''
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
`process_client''
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each''
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
`process_client''
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run''
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
`initialize''
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new''
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run''
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
`initialize''
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new''
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run''
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:34:in
`run''
/Users/matthew/.gem/ruby/1.8/gems/rails-2.3.5/lib/commands/server.rb:111
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`gem_original_require''
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require''
script/server:3
Request
Parameters:
{"section_id"=>1,
"language_id"=>3}
Show session dump
---
Response
Headers:
{"Content-Type"=>"text/html; charset=utf-8",
"Cache-Control"=>"no-cache"}
_____________________
Console error output:
Rendering home/index
NewsItem Columns (3.9ms) SHOW FIELDS FROM `news`
NewsItem Load (0.6ms) SELECT * FROM `news` WHERE (`news`.`id` 6448)
ActionView::TemplateError (undefined method `alternative_url'' for
#<NewsItem:0x50cb390>) on line #11 of app/views/home/index.html.erb:
8: :width => 499,
9: :height => 281,
10: :version => "9",
11: :flashvars =>
front_page_panel_flashvars(@featured_panels),
12: :params => {:allowScriptAccess => "always",
:bgcolor
=> "1C1C1C", :wmode => "transparent"},
13: :alt =>
(link_to(image_tag(@featured_panels.first.try(:image_path), :width =>
499, :height => 281), @featured_panels.first.try(:path)) unless
@featured_panels.empty?)
14: %>
app/models/news_item.rb:91:in `path''
app/helpers/home_helper.rb:4:in `front_page_panel_flashvars''
app/helpers/home_helper.rb:4:in `map''
app/helpers/home_helper.rb:4:in `front_page_panel_flashvars''
app/views/home/index.html.erb:11
vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/agent/method_tracer.rb:319:in
`render''
vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/agent/method_tracer.rb:141:in
`trace_execution_scoped''
vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/agent/method_tracer.rb:314:in
`render''
vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/control/./agent/instrumentation/controller_instrumentation.rb:254:in
`perform_action''
vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/agent/method_tracer.rb:141:in
`trace_execution_scoped''
vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/control/./agent/instrumentation/controller_instrumentation.rb:247:in
`perform_action''
vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/rack/developer_mode.rb:20:in
`call''
vendor/gems/newrelic_rpm-2.13.1/lib/new_relic/rack/developer_mode.rb:20:in
`call''
vendor/gems/hoptoad_notifier-2.3.8/lib/hoptoad_notifier/rack.rb:27:in
`call''
Rendered rescues/_trace (74.9ms)
Rendered rescues/_request_and_response (3.5ms)
Rendering rescues/layout (internal_server_error)
____________
END
Thanks again!
--
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.