disable assets precompile function in Rails

11,665

Solution 1

Take a look at The Assets Pipeline Guide.

The asset pipeline is enabled by default. It can be disabled in config/application.rb by putting this line inside the application class definition:

config.assets.enabled = false

Solution 2

Alternative Approach

config.assets.precompile

Is an array of files to be compiled. Swap it with an empty array to avoid precompilation.

# config/application.rb
# ...
config.assets.precompile = []
# ...
Share:
11,665
lipenco
Author by

lipenco

Updated on June 14, 2022

Comments

  • lipenco
    lipenco almost 2 years

    I would like to disable assets precompile function in rails. I am working on app where user can download the code, and I would like to avoid changeing the names of the css and js files in downloaded html file - so as the user can run the index.html and see everything.

    Here is the app: http://impress-builder.herokuapp.com/