Disable Asset Pipeline/Sprockets Rails 4.1

Patrick Cauley picture Patrick Cauley · Mar 22, 2014 · Viewed 15.6k times · Source

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.

Answer

Kirti Thorat picture Kirti Thorat · Mar 22, 2014

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