```ruby
require 'http_accept_language'
require 'rails/locale_detection'

begin
  ActionController::Base.include Rails::LocaleDetection 
rescue NameError
  
end```

Test for rails the right way
user
```ruby
require 'http_accept_language'
require 'rails/locale_detection'

ActionController::Base.send :include, Rails::LocaleDetection if defined?(ActionController)
```
assistant