Last active
July 29, 2019 01:28
-
-
Save simonrobson/6137148 to your computer and use it in GitHub Desktop.
Disable asset pipeline in Rails 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Comment in Gemfile: | |
# Use SCSS for stylesheets | |
# gem 'sass-rails', '~> 4.0.0' | |
# Use Uglifier as compressor for JavaScript assets | |
# gem 'uglifier', '>= 1.3.0' | |
# Use CoffeeScript for .js.coffee assets and views | |
# gem 'coffee-rails', '~> 4.0.0' | |
config/application.rb: | |
# split out components and comment sprockets | |
# require 'rails/all' | |
require "active_record/railtie" | |
require "action_controller/railtie" | |
require "action_mailer/railtie" | |
# require "sprockets/railtie" | |
require "rails/test_unit/railtie" | |
class Application < Rails::Application | |
# turn pipeline off | |
config.assets.enabled = false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks @simonrobson! This helped me to remove assets pipeline from a Rails 5.2 project making a few addional changes:
After commenting
require sprockets/railtie
from application.rb file we has no more access to assets pipeline configuration so we will need to remove assets.rb file, and all references toRails.application.config.assets
from your application, environment and initializers files.