Skip to content

Instantly share code, notes, and snippets.

@guilleiguaran
Created October 10, 2012 21:35
Show Gist options
  • Save guilleiguaran/3868589 to your computer and use it in GitHub Desktop.
Save guilleiguaran/3868589 to your computer and use it in GitHub Desktop.
Disabling frameworks in Rails 3+

Disabling frameworks in Rails 3+###

Replace in your config/application.rb

require "rails/all"

with:

require "rails"

# Pick the frameworks you want:
require "active_record/railtie"
require "action_controller/railtie"
require "sprockets/rails/railtie"
require "action_mailer/railtie"
require "rails/test_unit/railtie"

For example to disable sprockets-rails you can comment require "sprockets/rails/railtie".

This is done automatically for new apps when you use some of --skip-* flags, for example you can start a new app with sprockets railtie turned off with rails new foo --skip-sprockets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment