使用Rails应用程序推送到Heroku时,如何忽略文件夹和文件? [英] How do I ignore folders and files when pushing to Heroku with a Rails app?
本文介绍了使用Rails应用程序推送到Heroku时,如何忽略文件夹和文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 Rails 3.2.8
应用程序,我不想推送我的 spec
文件夹和 test
登录到Heroku。我将如何做到这一点?怎么样与暂存
远程?
I have a Rails 3.2.8
application and I don't want to push my spec
folder and test
log to Heroku. How would I do this? What about with a staging
remote?
谢谢。
推荐答案
$ c> .gitignore ,但这会将它们从整个存储库中排除。
You could put them in .gitignore
, but that will exclude them from your repository as a whole.
更好的解决方法是将它们推送到Heroku,但是防止Heroku将它们部署到您的dynos。您可以使用 .slugignore
文件。
The better solution is to push them to Heroku but prevent Heroku from deploying them to your dynos. You can configure that with a .slugignore
file.
这篇关于使用Rails应用程序推送到Heroku时,如何忽略文件夹和文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文