Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/52.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails ActiveStorage::FileNotFoundError在初始页面加载时出错(有时)_Ruby On Rails_Rails Activestorage - Fatal编程技术网

Ruby on rails ActiveStorage::FileNotFoundError在初始页面加载时出错(有时)

Ruby on rails ActiveStorage::FileNotFoundError在初始页面加载时出错(有时),ruby-on-rails,rails-activestorage,Ruby On Rails,Rails Activestorage,在我的rails应用程序中,我的活动存储有一个奇怪的问题,错误是: ActiveStorage::FileNotFoundError ActiveStorage::Representations::RedirectController#show 这个加载错误被命中 raise LoadError, "Unable to autoload constant #{qualified_name}, expected #{file_path} to define it" 具体错误:

在我的rails应用程序中,我的活动存储有一个奇怪的问题,错误是:

ActiveStorage::FileNotFoundError ActiveStorage::Representations::RedirectController#show

这个加载错误被命中

raise LoadError, "Unable to autoload constant #{qualified_name}, expected #{file_path} to define it"
具体错误:

Unable to autoload constant ActiveStorage::Blobs::RedirectController, expected /Users/username/.rvm/gems/ruby-2.6.6/gems/activestorage-6.1.3/app/controllers/active_storage/blobs/redirect_controller.rb to define it
这种情况有时会发生&如果发生这种情况,页面刷新将使图像显示出来。发生这种情况时,图像不会加载,并且似乎已损坏。我不能一直复制这个,有什么想法吗

Ruby 2.6.6p146 Rails 6.1.3