This project is archived and is in readonly mode.

#4061 ✓resolved
Myron Marston

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

Reported by Myron Marston | February 26th, 2010 @ 06:46 AM | in 3.0.2

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.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages