Forum: Ruby on Rails ActionPack fails to understand named routes in mailer views in 3.0.11 and 3.0.12 when production env

Posted by Panayotis Matsinopoulos (Guest)
on 2012-03-14 22:58
(Received via mailing list)
Hi,

I can replicate the problem in which ActionPack fails to undertand
named routes in mailer views for version 3.0.11 and 3.0.12 when in
production environment. In version 3.0.10 it works ok.

The exception that is raised for a statement like the following:

link_to _("Click here to see the case"),
account_case_url(@case.account, @case)

has stack trace:

ActionView::Template::Error: ActionView::Template::Error
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb:425:in
`raise_routing_error'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb:407:in
`rescue in generate'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb:396:in
`generate'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb:454:in
`generate'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb:482:in
`url_for'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/action_dispatch/routing/url_for.rb:131:in
`url_for'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/action_view/helpers/url_helper.rb:99:in
`url_for'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/action_dispatch/routing/route_set.rb:195:in
`account_case_url'
  from /home/panayotis/my_documents/foo/app/views/case_mailer/
case_creation.html.erb:2:in
`_app_views_case_mailer_case_creation_html_erb__243041699_87752360__1023904936'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/action_view/template.rb:162:in `block in render'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
activesupport-3.0.11/lib/active_support/notifications.rb:54:in
`instrument'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/action_view/template.rb:154:in `render'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/action_view/render/rendering.rb:59:in `block in
_render_template'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
activesupport-3.0.11/lib/active_support/notifications.rb:52:in `block
in instrument'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
activesupport-3.0.11/lib/active_support/notifications/instrumenter.rb:
21:in `instrument'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
activesupport-3.0.11/lib/active_support/notifications.rb:52:in
`instrument'
... 13 levels...
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionmailer-3.0.11/lib/action_mailer/base.rb:673:in `mail'
  from /home/panayotis/my_documents/foo/app/mailers/case_mailer.rb:
13:in `case_creation'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/abstract_controller/base.rb:150:in
`process_action'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/abstract_controller/base.rb:119:in `process'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionpack-3.0.11/lib/abstract_controller/rendering.rb:41:in `process'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionmailer-3.0.11/lib/action_mailer/old_api.rb:75:in `process'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionmailer-3.0.11/lib/action_mailer/base.rb:471:in `process'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionmailer-3.0.11/lib/action_mailer/base.rb:466:in `initialize'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionmailer-3.0.11/lib/action_mailer/base.rb:450:in `new'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
actionmailer-3.0.11/lib/action_mailer/base.rb:450:in `method_missing'
  from (irb):3
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
railties-3.0.11/lib/rails/commands/console.rb:44:in `start'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
railties-3.0.11/lib/rails/commands/console.rb:8:in `start'
  from /home/panayotis/.rvm/gems/ruby-1.9.3-p125@foo/gems/
railties-3.0.11/lib/rails/commands.rb:23:in `<top (required)>'
  from script/rails:6:in `require'
  from script/rails:6:in `<main>'

Has anybody else experience this problem? Is there a workaround? Or
shall I rollback to 3.0.10?

Thanks in advance
Panayotis
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.