7

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/

lipenco
  • 1,358
  • 5
  • 16
  • 30

2 Answers2

14

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
Mini John
  • 7,855
  • 9
  • 59
  • 108
8

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 = []
# ...
Pooyan Khosravi
  • 4,861
  • 1
  • 19
  • 20