rails active_storage:install IS NOT WORKING

半城伤御伤魂 提交于 2019-11-30 20:08:01

Your problem is here:

require "active_storage"

You need to require the engine:

require "active_storage/engine"

Try running command in the project root

bin/rails activestorage:install

or

rake active_storage:install

The current rails official documents talks about the new application. But if you're upgrading a pre 5.2 app, you have to add or uncomment the field in application.rb

require "active_storage/engine"

For the new application, this will be already added.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!