grunt build with compass fails on some environments, how I fix it

As I have mentioned in my first post here, I will write also about other things not only Sitecore, as in my daily work I do work with other things too.

So, let’s get into it.

Sometimes I need to build in my local environment the frontend project that my colleagues create in order to make small changes/adjustments or test the backend work much better.

And one some project, true, some old ones I was getting this error when building with grunt the project :

Warning: Running "compass:dist" (compass) task
Warning: not found: compass Use --force to continue.

I have tried many things on my environment to fix this and seems that a combination of things let to fix this problem, so now I can build old frontend projects:

  1. Un-install all versions of Ruby from the working computer
  2. Install latest version of Ruby into the Windows machine with the option “Add Ruby executable to your PATH” selected and then restart the computer
  3. Install Compass and Sass on your computer. Open command prompt and run the following commands:
      1. gem update --system
        gem install compass
        gem install sass
        
  4. Update compass in your project with this command from inside your project dir
      1. npm install grunt-contrib-compass --save-dev

I hope it works for you.

Good luck.

2 Replies to “grunt build with compass fails on some environments, how I fix it”

  1. I had the compass installed but still I was getting the error. Then I did the `update` and after that installed compass again and then it worked 😀
    So – thanks for the useful tip.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.