2
votes

I'm on a shared server with multiple versions of Compass and Sass installed.

The latest version of Compass (0.12.6), is dependent on Sass 3.2.19, where 3.3.8 is the newest version installed on the machine.

CSS compilation is dependent on grunt & grunt-sass-contrib.

I'm looking for a way to specify either the version of Sass, or the version of Compass to use in the Grunt build process.

I have tested the latest pre-release version of Compass and this works fine: compass install --pre, but cannot install this globally, as other projects are dependent on the previous version. Likewise, if I roll back the version of Sass to 3.2.19 my project compiles but others will be affected.

I can also get the Sass to compile using compass watch and forcing the version number, but this needs to compile through Grunt rather than Compass.

I can't use RVM as I'm on Windows. Investigating Bundler (Grunt/Bundler wont use specified sass version), seems like it might bear fruit, but Grunt needs to run as a standalone, so I can't run the command bundle exec grunt as mentioned in the comments.

Does anyone have any experience of such a scenario?

1
I am not sure I understand the problem here. If Compass requires a specific version of Sass, then it will only use that version of Sass. You simply cannot use Sass 3.3.8 with Compass 0.12.6 because the dependencies don't match up: Compass will try to use the newest version of Sass 3.2 that's available.cimmanon
compass watch works fine - but running Sass compilation through a grunt script using grunt-contrib-sass returns the error Cannot load compassamigolargo

1 Answers

4
votes

Bundler was the answer.

Creating a gem file with the dependencies listed in it, then running bundle install, followed by bundler exec grunt fixed the problem.