无法通过 Rails 设置中的错误 - `LoadError: cannot load such file -- active_storage/engine` [英] Can't get past error in Rails Setup- `LoadError: cannot load such file -- active_storage/engine`

查看:37
本文介绍了无法通过 Rails 设置中的错误 - `LoadError: cannot load such file -- active_storage/engine`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置一个新的 Rails 应用程序,但遇到了一个我似乎无法解决的问题.尝试运行 rake db:droprake db:create 时,我不断收到错误消息:

I'm trying to setup a new Rails application and having an issue that I can't seem to resolve. When trying to run rake db:drop or rake db:create I keep getting the error:

LoadError: 无法加载此类文件 -- active_storage/engine

起初我收到一个错误:

LoadError: cannot load such file -- bootsnap/setup 但在将它添加到我的 gemfile 后能够清除它.

LoadError: cannot load such file -- bootsnap/setup but was able to clear that after adding it to my gemfile.

我在 Github 上看到一些信息建议取消注释 require "active_storage/engine" 但我已经这样做了.不知道该怎么办.

I see some info on Github that suggests uncommenting require "active_storage/engine" but I've already done that. Not sure what to do.

推荐答案

我在将应用程序从 rails 6.0 降级到 5.2 时遇到此错误

I got this error whilst downgrading my app from rails 6.0 to 5.2

检查您的 config/application.rb 以获取该行

Check in your config/application.rb for the line

require "action_mailbox/engine"

并尝试将其注释掉.

这篇关于无法通过 Rails 设置中的错误 - `LoadError: cannot load such file -- active_storage/engine`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆