Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncompile Development Asset Pipeline

I was compiling my asset pipeline for my production environment and it did for all my environments. How can I uncompile my asset pipeline for my development environment?

I have checked my config/development environment and cannot find a fix.

Thanks in advance for any help...

like image 708
Kyle C Avatar asked Dec 19 '11 03:12

Kyle C


People also ask

What is an asset pipeline?

1 What is the Asset Pipeline? The asset pipeline provides a framework to concatenate and minify or compress JavaScript and CSS assets. It also adds the ability to write these assets in other languages and pre-processors such as CoffeeScript, Sass, and ERB.

How do you Precompile an asset?

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.

What does rake assets Clean do?

The clean it removes the old versions of the precompiled assets while leaving the new assets in place. Show activity on this post. rake assets:clean removes compiled assets. It is run by cap deploy:assets:clean to remove compiled assets, generally from a remote server.

What are assets in Rails?

Generally asset is anything that browser loads after it gets the HTML page. Meaning javascript, css and any images. But as you pointed out there are two different image types in a rails project.


2 Answers

To remove precompiled assets use:

rake assets:clean 

What this basically does is remove the public/assets directory. You may need to include the RAILS_ENV variable if you need to run it for a certain environment.

like image 189
Phil Bottomley Avatar answered Sep 16 '22 14:09

Phil Bottomley


Try using

rake assets:clobber 

worked for me in rails 4

like image 30
mattecalcio Avatar answered Sep 18 '22 14:09

mattecalcio