```ruby
require 'mini_profiler/profiler'
require 'patches/sql_patches'

if defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i == 3
  require 'mini_profiler_rails/railtie'
end
```

Load railtie under Rails 4.x
user
```ruby
require 'mini_profiler/profiler'
require 'patches/sql_patches'

if defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i >= 3
  require 'mini_profiler_rails/railtie'
end
```
assistant