Skip to content

Instantly share code, notes, and snippets.

@rlb3
Forked from guilleiguaran/disable_framework.md
Created October 17, 2012 12:19
Show Gist options
  • Save rlb3/3905241 to your computer and use it in GitHub Desktop.
Save rlb3/3905241 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