Organizational Research By

Surprising Reserch Topic

how to setup gruntfile to use compass sass on heroku

how to setup gruntfile to use compass sass on heroku  using -'node.js,heroku,compass-sass,gruntjs'

I've successfully set up my heroku app with the grunt buildpack. When I push my Node.js app to heroku it will run the appropriate grunt task.

What I'd like is to use the 'grunt-contrib-compass' package to compile my .scss files. But that requires the compass executable and I don't know how to get that.

I've checked the heroku documentation and have seen an outdated doc that describes setting up compass with ruby... but I haven't seen any recent documentation for setting it up with Node.js.

Any ideas?

asked Sep 22, 2015 by nikhilapatil
0 votes

Related Hot Questions

2 Answers

0 votes

This took a lot of figuring out, but I've finally managed to get it to work. What's needed is to get Ruby to install alongside your Node.js app, so you can install the appropriate gems. This gist was very helpful and more-or-less describes what I needed to do.

In summary, the process was:

  • Create the files .buildpacks, Gemfile, and Gemfile.lock in the project directory, with the following contents:



source ""
gem "sass"


    sass (3.4.5)



nb. I'm only using Sass, not Compass, but I'm guessing all you'll need to do to get compass is just add gem "compass" to the Gemfile and, eg. compass (1.0.3) below sass in the Gemfile.lock.

answered Sep 22, 2015 by abhi
0 votes

There is a forked-fork that includes compass installation. That might help:

answered Sep 22, 2015 by rajesh