2012-03-12 2 views
1

다음과 같은 문제가 있습니다. ActionMailer 용 템플릿을 렌더링 할 때 My Resque 배경 작업이 실패합니다. 그러나 이것은 프로덕션 환경에있을 때만 발생합니다.Rails ActionMailer가 프로덕션 환경에서 라우팅 오류를 발생시키는 이유는 무엇입니까?

오류는 라우팅 오류와 관련이 있습니다. 내가 대답이 주어지지, 거기 similar post on SO하지만 알고

link_to _("Click here to see the case"), 
     account_case_url(:only_path => false, 
         :host => "production.foo.com", 
         :controller => "cases", 
         :action => "show", 
         :id => @case.id, :account_id => @case.account.id) 

:

다음과
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb:425:in `raise_routing_error' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb:407:in `rescue in generate' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb:396:in `generate' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb:454:in `generate' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb:482:in `url_for' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_dispatch/routing/url_for.rb:131:in `url_for' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_view/helpers/url_helper.rb:99:in `url_for' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb:195:in `account_case_url' 
/home/foo/production/source/app/views/case_mailer/case_creation.html.erb:3:in `_app_views_case_mailer_case_creation_html_erb__56964564007999368_36702160_384137435874551441' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_view/template.rb:162:in `block in render' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.11/lib/active_support/notifications.rb:54:in `instrument' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_view/template.rb:154:in `render' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_view/render/rendering.rb:59:in `block in _render_template' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.11/lib/active_support/notifications.rb:52:in `block in instrument' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.11/lib/active_support/notifications/instrumenter.rb:21:in `instrument' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.11/lib/active_support/notifications.rb:52:in `instrument' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_view/render/rendering.rb:56:in `_render_template' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/action_view/render/rendering.rb:26:in `render' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/abstract_controller/rendering.rb:115:in `_render_template' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/abstract_controller/rendering.rb:109:in `render_to_body' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/abstract_controller/rendering.rb:102:in `render_to_string' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/abstract_controller/rendering.rb:93:in `render' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.11/lib/action_mailer/deprecated_api.rb:111:in `render' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.11/lib/action_mailer/base.rb:735:in `block in collect_responses_and_parts_order' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.11/lib/action_mailer/base.rb:750:in `each' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.11/lib/action_mailer/base.rb:750:in `block in each_template' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.11/lib/action_mailer/base.rb:745:in `each' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.11/lib/action_mailer/base.rb:745:in `each_template' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.11/lib/action_mailer/base.rb:731:in `collect_responses_and_parts_order' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.11/lib/action_mailer/base.rb:673:in `mail' 
/home/foo/production/source/app/mailers/case_mailer.rb:13:in `case_creation' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/abstract_controller/base.rb:150:in `process_action' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/abstract_controller/base.rb:119:in `process' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.11/lib/abstract_controller/rendering.rb:41:in `process' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.11/lib/action_mailer/old_api.rb:75:in `process' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.11/lib/action_mailer/base.rb:471:in `process' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.0.11/lib/action_mailer/base.rb:466:in `initialize' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/resque_mailer-1.0.1/lib/resque_mailer/rails3.rb:16:in `new' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/resque_mailer-1.0.1/lib/resque_mailer/rails3.rb:16:in `deliver!' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/resque_mailer-1.0.1/lib/resque_mailer/rails3.rb:37:in `perform' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/resque-1.17.1/lib/resque/job.rb:127:in `perform' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/resque-1.17.1/lib/resque/worker.rb:163:in `perform' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/resque-1.17.1/lib/resque/worker.rb:130:in `block in work' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/resque-1.17.1/lib/resque/worker.rb:116:in `loop' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/resque-1.17.1/lib/resque/worker.rb:116:in `work' 
script/resque_worker:13:in `start' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:51:in `block in start' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:38:in `fork' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:38:in `start' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:181:in `block in start' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:181:in `map' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:181:in `start' 
/home/foo/production/source/vendor/bundle/ruby/1.9.1/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:165:in `spawn!' 
script/resque_worker:22:in `<main>' 

내보기 템플릿의 코드는 것처럼 다음은 스택 추적입니다. 또한, 제 문제는 프로덕션 환경에서만 나타납니다.

업데이트 다시 말하지만이 메시지는 다시 관련이 없습니다. resque mailer를 비활성화 한 후에 문제를 재현 할 수 있습니다. 따라서이 문제를 일으키는 것은 생산 현장의 ActionMailer입니다.

업데이트 2 레일즈 3.0.11 및 3.0.12에 문제가있는 것 같습니다. 3.0.10 잘 작동합니다.

+0

스택 추적이지만 실제 오류 메시지는 무엇입니까? –

+0

@AndrewMarshall'ActionView :: Template :: Error' –

답변

0

롤백 3.0.10. 3.0.11과 3.0.12에 버그가 있습니다.

+0

및 3.0.14라고 생각합니다. –

관련 문제