- 
                Notifications
    
You must be signed in to change notification settings  - Fork 100
 
TIP: Facets on Rails
        Rex Madden edited this page Sep 12, 2018 
        ·
        5 revisions
      
    The latest correct way to handle this is to add the require to "config/boot.rb".
This will ensure that Facets is loaded before ActiveSupport, giving ActiveSupport the last word in method definitions.
Please help keep this information updated.
In the gemfile:
gem 'facets', require: false
In boot.rb
...
require 'facets/xxx'
I recently was told that the preinitializer.rb approach no longer works and that the solution is in "config/application.rb" just before
require 'rails/all'
add
require 'facets'
or
require 'facets/xxx'
require 'facets/yyy'
...
This will ensure that Facets is loaded before ActiveSupport, giving ActiveSupport the last word in method definitions.
In "config/preinitializer.rb" add
require 'facets'
or
require 'facets/xxx'
require 'facets/yyy'
...
This will ensure that Facets is loaded before ActiveSupport, giving ActiveSupport the last word in method definitions.