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

netuser · November 29, 2018 · Last by lidashuang replied at December 04, 2018 · 5402 hits

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

Docker 的话 你需要重新 build image

Reply to tuliang

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

你需要 volumns 吧

Reply to 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 试试

Reply to netuser

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

You need to Sign in before reply, if you don't have an account, please Sign up first.