Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

config.cache_classes and ActionMailer::Base.default_url_options

#6380

I have this is my test.rb:

config.cache_classes = true
config.action_mailer.default_url_options = {
  :host => 'localhost:3000',
  :only_path => false
}

When running tests, I get:

/Users/sebastian/.rvm/gems/ruby-1.9.2-p136/gems/actionmailer-3.0.3/lib/action_mailer/base.rb:763:in deprecated_url_options': You can no longer call ActionMailer::Base.default_url_options directly. You need to set config.action_mailer.default_url_options. If you are using ActionMailer standalone, you need to include the routing url_helpers directly.

This problem does not occur, when using:

config.cache_classes = false
Regards,
sewid

Reported by sewid · February 6th, 2011 @ 08:00 AM

State: stale
Milestone: none
Assigned to: Andrew White Andrew White
Importance: Low

Activity

  1. sewid
    sewid

    Seems to be an rspec problem. The error occurs with rspec 2.5.0 (I did not recognize, that there was an update). When I use 2.4.0, the tests passes without problems.

    February 6th, 2011 @ 10:23 PM

  2. Andrew White
    Andrew White
    • State changed from new to needs-more-info
    • Assigned user set to Andrew White
    • Importance changed from to Low

    sewid, can you supply a backtrace - I can't anything in the rspec-rails 2.4 -> 2.5 diff that refers to default_url_options so I can't track it down at the moment.

    February 9th, 2011 @ 06:53 AM

  3. sewid
    sewid

    Hi,

    I updatesd to 2.5.0 yesterday and now, everything works. But when hitting the problem, I restored an old Gemfile - so it may be, there is a nother gem causing this problem.
    I will update this ticket, if I find the reason. At the moment, everything is working (event with rspec 2.5.0).

    Regards,
    sewid

    February 9th, 2011 @ 06:57 AM

  4. Andrew White
    Andrew White
    • State changed from needs-more-info to stale

    Marking as stale as no feedback for a month

    March 6th, 2011 @ 04:28 PM