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.
我是否正确地说雷神独立于轨道运行?
如果是这种情况,是否有开箱即用的方法来初始化 Rails 并初始化诸如“config/initializers”之类的东西?
你是对的 - Thor 独立于 Rails 运行。
要包含 Rails 环境(与 : rake 中的环境相同),请在 thor 任务方法中执行此操作
require './config/environment' # require rails environments