Question

In short: I can't find the correct CSS files which would let me play around with the designs on my localhost. The changes are not applying right away. Assets are all precompiled, and I'm confused.

Summary: I'm trying to understand how I'm supposed to organize my local assets. There is the local machine, staging server, and production server. Capistrano pre-compiles assets when I deploy them to the staging server or the production server. When other people work on the code and deploy on staging, then I have to pull those changes, right? This makes me pull the compiled assets. So, I end up with the CSS files, which are minimized and I can't really change things on those CSS files and see change on my localhost.

How can I keep the local files not compiled, even if I need to pull versions from servers that have already compiled assets on them. I would really appreciate it, if anyone can give me good direction for keeping the best rails development environment. I just want to keep the assets (not compiled) on the local environment.

Cheers!

Was it helpful?

Solution

Assets should not be precompiled in development. You should be committing and pushing the uncompiled files, and then they should be compiled as part of the deploy process. When other people make changes, they will change the original uncompiled stylesheets and javascript files, which you can then pull down.

When running a rails server in development, it will compile assets on the fly whenever they are requested. It is intelligent enough to recompile them automatically when you make changes. These will be cached in the tmp/ directory and you won't need to check them in or do anything.

If you have previously precompiled assets in development, remove them with rake assets:clean.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top