Jul 10, 2014
1 min read.
One of the problems we had when using it, was that as we have several Django projects we're very used to have different version of dependencies for each project using VirtualEnvWrapper, therefore,
we wanted to as well have multiple versions of compass and switch them in a per project basis.
So, after reading a little and browsing for answers on StackOverflow we found that having multiple compass versions was pretty easy as we could install the versions we needed and pass the desired one as a parameter to the compass command.
That sounds nice, show me the code! so here's how we go about it.
Install all the compass versions you want to use
# Install the latest version gem install compass # Install 0.10.5 gem install compass -v 0.10.5 # Install 0.12.6 gem install compass -v 0.12.6
Once in a project, if we want to compile the styles using compass
0.10.5 we would type:
compass _0.10.5_ compile app/static
And the same goes for another project that uses the version
0.12.6 of compass
compass _0.12.6_ compile app/static
This option also works for the
compass _0.12.6_ watch app/static
And after doing this, we were able to use a different version of compass depending on the project we were working on.