rails active_storage:install 在使用 --minimal 创建的应用程序中失败

我使用 --minimal 制作了一个应用程序,因为标准 Rails 应用程序很臃肿,我宁愿一次添加一个,这样我就不会得到未使用的依赖项等。

但是当我尝试添加 activeStorage 时,我得到以下信息:

rails aborted!
Don't know how to build task 'active_storage:install' (See the list of available tasks 
with `rails --tasks`)

结果与 rails active_storage:install:migrationsapp:active_storage:install:migrations 相同。

我已在 application.rb 中取消注释此行:

require "active_storage/engine"

但这并没有解决问题。我创建了另一个没有 --minimal 标志的应用程序,它对那个应用程序运行良好,所以我确定我只是遗漏了一些拼图。

感谢任何帮助!

注意:我使用的是带有 Ubuntu 发行版的适用于 Linux 的 Windows 子系统。导轨 6.1.4

heshi110 回答:rails active_storage:install 在使用 --minimal 创建的应用程序中失败

一定是做错了什么,因为它开始工作了。我认为 application.rb 文件没有被保存。

本文链接:https://www.f2er.com/4490.html

大家都在问