Use the multiple build method from Heroku:
Using Multiple Buildpacks for an Application
Using NodeJS first and then Ruby, Heroku will install your node dependencies before anything happens in Ruby.
heroku buildpacks:set heroku/ruby heroku buildpacks:add
This will install the build package in heroku/ruby
and then add heroku/nodejs
, but at index 1 (which is the first). To confirm this, run:
heroku buildpacks
source share