更新时间:2023-01-12 13:47:59
当我尝试运行命令行脚本(这里假设为my_script")时,发生了同样的错误.原因是:
when I tried to run a command line script (let's say 'my_script' here), the same error happened. The reasons were:
因此,以下是我的解决方案:
So, the following is the solution in my case:
$ RAILS_ENV=生产 my_script
$ RAILS_ENV=production my_script