Installing gems on node heroku projects

巧了我就是萌 提交于 2019-12-23 09:55:35

问题


I'm writing a node app on heroku, and the app requires a gem, compass to be installed, for node-compass.

However, I can't seem to work out how you install gems in a node application on heroku. I have a Gemfile, which looks like so.

source "https://rubygems.org"
gem 'compass'

Have you managed to do this successfully before?


回答1:


According to an official reply from Heroku for this question:

You would need to use the heroku multi buildpack in order to have both the Ruby buildpack and the Node buildpack: https://github.com/ddollar/heroku-buildpack-multi




回答2:


In addition to a Gemfile, you need a buildpack and a Gemfile.lock. I wrote up how I got this working in this answer to a slightly different question, but I think it should answer this question too.



来源:https://stackoverflow.com/questions/15465342/installing-gems-on-node-heroku-projects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!