如何在生产环境中添加时间格式?

How to add time format to locale on production?

我使用 Activeadmin gem,当我尝试访问我的网站时出现错误:ActionView::Template::Error (translation missing: ru.time.formats.long)。在我本地电脑的开发模式下也是同样的错误,我只是添加

time:
  formats:
    long: "%Y-%m-%d %H:%M:%S"

到外部库中的 activeadmin 原始 ru 语言环境。不好,我知道。但是在生产中我不能这样做。我试图在我的应用程序中将此格式添加到 config/locales,但没有任何反应。如何添加?

更新 很抱歉我提出了愚蠢的问题,但我会把它留在这里。通过在 config/localesserver restart

中向您的语言环境添加格式来解决问题

问题已通过在 config/locales

中为您的语言环境添加格式来解决
time:
  formats:
    long: "%Y-%m-%d %H:%M:%S"

服务器重启