简体   繁体   English

如何清理RoR数据库yml缓存?

[英]How to clean RoR database yml cache?

I've just set out to creating my first RoR project, using MySQL. 我刚刚开始使用MySQL创建我的第一个RoR项目。 Obviously after the first visit to browser the site informed me about not being able to connect to the DB with the current settings. 显然,在第一次访问浏览器后,该站点通知我无法使用当前设置连接到数据库。 I've quickly updated them in the config/database.yml, however it still complained about the old settings. 我已经在config / database.yml中快速更新了它们,但它仍然抱怨旧的设置。

Eventually, it updated and was working fine, but I'm sure there's a cache somewhere that could have been cleared to make this less of a nuisance. 最终,它更新并且工作正常,但我确定在某处可以清除某个缓存,以减少这种麻烦。

I have commented it earlier, Now adding it to my answer ;) 我之前已经评论过,现在将它添加到我的答案中;)

It seems like you have not restarted the server after done the changes in database.yml. 在完成database.yml中的更改后,您似乎还没有重新启动服务器。 Because, database.yml is being loaded once at the time of server start-up. 因为,database.yml在服务器启动时被加载一次。 So please try with restarting your rails server. 所以请尝试重新启动rails服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM