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.

Rails 3 ActionMailer NameError: uninitialized constant AbstractController::Collector::Mime

#4061

I ran across this error while getting my mail_safe gem to work with Rails 3:

NameError: uninitialized constant AbstractController::Collector::Mime
    from /Users/myron/.rvm/gems/ruby-1.9.1-p376/gems/actionpack-3.0.0.beta/lib/abstract_controller/collector.rb:13:in `'
    from /Users/myron/.rvm/gems/ruby-1.9.1-p376/gems/actionpack-3.0.0.beta/lib/abstract_controller/collector.rb:2:in `'
    from /Users/myron/.rvm/gems/ruby-1.9.1-p376/gems/actionpack-3.0.0.beta/lib/abstract_controller/collector.rb:1:in `'
    from /Users/myron/.rvm/gems/ruby-1.9.1-p376/gems/actionmailer-3.0.0.beta/lib/action_mailer/collector.rb:1:in `require'
    from /Users/myron/.rvm/gems/ruby-1.9.1-p376/gems/actionmailer-3.0.0.beta/lib/action_mailer/collector.rb:1:in `'
    from /Users/myron/.rvm/gems/ruby-1.9.1-p376/gems/actionmailer-3.0.0.beta/lib/action_mailer/base.rb:3:in `require'
    from /Users/myron/.rvm/gems/ruby-1.9.1-p376/gems/actionmailer-3.0.0.beta/lib/action_mailer/base.rb:3:in `'
    from (irb):5
    from /Users/myron/.rvm/ruby-1.9.1-p376/bin/irb:15:in `'

Here's some code to reproduce. You can run it in irb and you'll get the error:

require 'rubygems'
gem 'actionmailer', '3.0.0.beta'
require 'action_mailer'

class TestMailer < ActionMailer::Base
end

My work around was to require action_dispatch/http/mime_type, but I feel like I shouldn't have to do that.

Reported by Myron Marston · February 26th, 2010 @ 06:46 AM

State: resolved
Milestone: 3.0.2
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. José Valim
    José Valim
    • Assigned user changed from Mikel Lindsaar to José Valim
    • State changed from new to resolved
    • Milestone cleared.

    Yup, fixed.

    February 26th, 2010 @ 09:40 AM

  2. Repository
  3. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 3.0.2
    • Importance changed from to Low

    October 15th, 2010 @ 11:01 PM