禁用资产管道/ Sprockets Rails 4.1 [英] Disable Asset Pipeline/Sprockets Rails 4.1

查看:107
本文介绍了禁用资产管道/ Sprockets Rails 4.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法找到一种方法来在Rails 4.1中禁用资产管道。我看到很多关于Rails 3.2的信息。

我想使用Grunt / GulpJs和bower来处理我的所有资产,我似乎无法为此找到任何东西。相反,我找到了一个体面的金额,但其中大部分不适用于我或被打破。



半管宝石。然而,半管依赖于Rails 4.0,我在Rails 4.1上,并且我无法找到将Gem安装到不同版本的Rails中的位置,如果甚至可能的话。



这个问题扩展到比我想要的更多的问题。基本上我只需要知道如何禁用Asset Pipeline,除了如何集成GruntJS。

解决方案

您可以禁用资产在 config / application.rb 中通过添加以下行来管道:

  config.assets.enabled = false 

您也可以关闭资产管道,同时创建新的导轨通过将--skip-sprockets选项传递给它:

  rails新myappname --skip-sprockets 


I cannot seem to find a way to disable the Asset Pipeline in Rails 4.1. I see a lot of information for Rails 3.2.

I want to use Grunt/GulpJs and bower to handle all of my assets and I cannot seem to find something for this. Rather I find a decent amount but most of it doesn't apply to me or is broken.

There is the half-pipe gem. However half-pipe relies on Rails 4.0 and I'm on Rails 4.1 and I can't find where to force a Gem to install in different version of Rails, if that's even possible.

This question expanded into a few more questions than I intended. Basically I just need to know how to disable the Asset Pipeline, barring that how to integrate GruntJS.

解决方案

You can disable the asset pipeline in config/application.rb by adding the following line to it :

config.assets.enabled = false

You could also turn off asset pipeline while creating a new rails application by passing the --skip-sprockets option to it:

rails new myappname --skip-sprockets

这篇关于禁用资产管道/ Sprockets Rails 4.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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