rails/rails — pull request #13967 by fphilipe (2014-02-07 10:41:50+00:00)
Title: Require action_view to fix missing constant ENCODING_FLAG

Requiring `action_view/view_paths` instead of `action_view` may cause an uninitialized
constant error for ENCODING_FLAG, which is defined in `action_view`.

The error was the following:

```
/home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/template/handlers/erb.rb:90:in `': uninitialized constant ActionView::Template::Handlers::ERB::ENCODING_FLAG (NameError)
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/template/handlers/erb.rb:76:in `'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/template/handlers/erb.rb:5:in `'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/template/handlers/erb.rb:4:in `'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/template/handlers/erb.rb:3:in `'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/template/handlers.rb:10:in `extended'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/template.rb:97:in `extend'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/template.rb:97:in `'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/template.rb:7:in `'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/template.rb:5:in `'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/base.rb:7:in `require'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/base.rb:7:in `'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/view_paths.rb:1:in `require'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionview/lib/action_view/view_paths.rb:1:in `'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionpack/lib/abstract_controller/rendering.rb:3:in `require'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionpack/lib/abstract_controller/rendering.rb:3:in `'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionmailer/lib/action_mailer/base.rb:368:in `'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionmailer/lib/action_mailer/base.rb:363:in `'
from /home/travis/build/fphilipe/premailer-rails/vendor/bundle/ruby/1.9.1/bundler/gems/rails-1713e8fe1617/actionmailer/lib/action_mailer/base.rb:9:in `'
from /home/travis/build/fphilipe/premailer-rails/lib/premailer/rails.rb:22:in `'
```

This error occurs when using standalone ActionMailer. The line that triggers the above error is something along the following:

```ruby
ActionMailer::Base.register_interceptor(object)
```