Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发新组件,不想每次都在重新加载环境上浪费时间。
我发现很少有相关问题,但没有一种解决方案适合我。那么当源更改时自动从 lib 文件夹重新加载代码的技术是什么?
请在 config/application.rb 中添加以下行。
config.autoload_paths += %W(#{config.root}/lib)