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.
To compile your assets locally, run the assets:precompile task locally on your app. Make sure to use the production environment so that the production version of your assets are generated. A public/assets directory will be created. Inside this directory you'll find a manifest.
Sprockets is a Ruby library for compiling and serving web assets. Sprockets allows to organize an application's JavaScript files into smaller more manageable chunks that can be distributed over a number of directories and files.
The require_tree directive tells Sprockets to recursively include all JavaScript files in the specified directory into the output. These paths must be specified relative to the manifest file.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With