如何确保 Heroku 上托管的 Ruby on Rails 应用程序已使用 GitHub 存储库中的最新代码进行更新?
我是 RoR、GitHub 和 Heroku 的新手,所以我仍在尝试解决这个问题。
我已对我的私人 GitHub 存储库中的某些文件进行了更改,并保存了更改(“提交”)。我原本希望看到这些更改立即反映在应用程序的 URL 上,但我没有看到任何变化。是时间有延迟,还是我做错了什么?
我在 GitHub 内部编辑了源代码。我也用过Aptana。
I'm a newbie to RoR, GitHub and Heroku, so I'm still trying to figure this out.
I've made changes to some file in my private GitHub repo, and saved changes ("commit"). I was expecting to see those changes reflect immediately on the app's URL, but I see no change. Is there a time delay, or am I doing things wrong?
I edited the sourcecode from within GitHub itself. I also used Aptana as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你必须像这样手动将更改推送到 Heroku 存储库:
you have to push your changes to your heroku repo manually like this:
您必须将更改推送到 Heroku,
请查看 Heroku 入门
you have to push your changes to heroku
take a look at Getting Started with Heroku
总 Git / Heroku n00b 在这里。
只是想插话说,在运行推送命令之前,我必须首先运行拉取请求。
已经进行了多次提交,但仅运行推送命令并没有在 Heroku 应用程序上显示更改。我认为原因是更新的文件不是由我提交的,而是由其他人远程提交的。然而,我是设置并管理 Heroku 应用程序的人。因此,我必须将提交的文件拉到本地设置中,然后才能将它们推送到 Heroku。
感谢 willglynn 通过他在另一个线程上的回答提供线索:
Total Git / Heroku n00b here.
Just wanted to chime in to say that before running the push command, I had to first run a pull request..
Multiple commits had been made, but just running the push command wasn't showing changes on the Heroku app. I think the reason being was that the updated files were not committed by me, but by someone else remotely. However I'm the one who set up and am managing the Heroku app. So, I had to pull the committed files onto my local setup before I could push them to Heroku.
Thanks go to willglynn for the clue-in via his answer on another thread: