新手问题 heroku 不显示更新后的代码结果?

chairy11 · 2013年04月15日 · 最后由 Yujing_Z 回复于 2013年04月16日 · 3547 次阅读

更新代码后 push 到 heroku,不是应该自动重启服务器然后显示更新后的代码的结果的吗? 可是我这边显示 push 代码成功,但查看页面结果却还是上一版的代码的结果,为什么? 应该进行怎样的操作?找不到相关教程呢……

#1 楼 @chenge Thx, but I didn't find the answer in the document~

你确定更新已经成功了?

#3 楼 @huacnlee All I konw is: "$ git push heroku master" ->"Everything up-to-date"

清下浏览器缓存试试

#3 楼 @huacnlee #5 楼 @Yujing_Z 我已经删掉原来的 APP,当时已经显示无此 APP 了。后来又重新布署,又用原来的名字,结果出来的还是上一版本的页面。是不是缓存问题?

#6 楼 @chairy11 heroku releases 看一下服务器上面是什么版本

#7 楼 @Yujing_Z === realcity-demo Releases v6 Deploy 4e648d0 [email protected] 2013/04/15 10:49:40 (~ 3h ago) v5 Add config [email protected] 2013/04/15 10:49:40 (~ 3h ago) v4 Add DATABASE_URL config [email protected] 2013/04/15 10:49:40 (~ 3h ago) v3 Attach HEROKU_POSTGRESQL_CRIMSON resou.. [email protected] 2013/04/15 10:49:39 (~ 3h ago) v2 Enable Logplex [email protected] 2013/04/15 10:41:29 (~ 3h ago) v1 Initial release [email protected] 2013/04/15 10:41:28 (~ 3h ago)

#8 楼 @chairy11 你看看你最新的 commit 的版本号,是不是和你 heroku 上面最新的一样

#10 楼 @Yujing_Z 我现在发现的问题是这样的,貌似我在本地已经删除的文件,在 bitbucket 上还有,那估计 heroku 上也还有,不把 public 的 index 删了,就进不了我的新主页。 问题是,我现在用“git rm public/index”会显示“fatal: pathspec 'public/index' did not match any files”

#11 楼 @chairy11 push heroku 是跟本地版本保持一致的,和你 bitbucket 上没有关系。

如果你确定不要这个 index,就直接 rm 就好了,然后再提交个版本

#12 楼 @Yujing_Z 可是我昨晚已经删除了这个 index 了,本地已经没有了,为什么 heroku 还能显示?难道是缓存问题? 现在我只想到两个可能原因:1.已经更新代码,但 index 没有相应删除。2.目前显示的 index 是之前缓存的。

#12 楼 @Yujing_Z 现在已经确定是因为原来的 public/index 没有删。你知道怎么在 heroku 上删这个文件吗?

@chenge @lgn21st @Yujing_Z @huacnlee

搞定了,谢谢各位! 之前没有用过 git rm,没把 public/index.html 删了,所以一直显示原样。现在好了。

#15 楼 @chairy11 Good. 昨天睡觉去了..

需要 登录 后方可回复, 如果你还没有账号请 注册新账号