在Rails中禁用资源预编译功能 [英] disable assets precompile function in Rails

查看:138
本文介绍了在Rails中禁用资源预编译功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在rails中禁用资源预编译功能。
我正在开发应用程序,用户可以下载代码,并且我想避免在下载的html文件中更改css和js文件的名称 - 以便用户可以运行index.html并查看所有内容。

以下是应用程序:
http:// impress-builder .herokuapp.com /

解决方案

请看资产管道指南。


默认。它可以在
config / application.rb中禁用,方法是将此行放入应用程序
类定义中:



  config.assets.enabled = false 


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/

解决方案

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

这篇关于在Rails中禁用资源预编译功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆