Homeland Docker 模式如何修改首页模板呢

netuser · 2018年11月29日 · 最后由 lidashuang 回复于 2018年12月04日 · 5401 次阅读

找到了 app/views/home 中的文件,但是修改了前台还是之前的页面。 尝试了 ruby 清空缓存,删除 cache 文件夹的内容,然后并没什么卵用... 没办法过来提问题了,thx

Docker 的话 你需要重新 build image

tuliang 回复

是直接 EXEC 进 DOCKER 中修改的,这种情况也需要重新 build 吗

你需要 volumns 吧

lidashuang 回复

😭 越说越复杂了.... 直接 EXEC 进运行中的 docker 使用 vi 修改的..

Rails caches Templates with the ActionView::Resolver::Cache. If you get the resolver you can then clear the context with clear_cache. In an ApplicationController you recieve the context via lookup_context.view_paths.paths.first. Just call clear_cache on the resolver and Rails will reload the cache at the next request.

ActionView::Resolver.clear_cache 试试

netuser 回复

开发环境不是用 volumns 吗,生产环境不是重新 build 吗

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