gpt4 book ai didi

ruby-on-rails - Capistrano - 载波加载错误 : cannot load such file -- carrierwave/processing/mime_types

转载 作者:行者123 更新时间:2023-12-04 06:03:12 24 4
gpt4 key购买 nike

当我运行上限生产部署时,我不断遇到载波错误。我在下面发布了我的载波设置。

Tasks: TOP => deploy:assets:precompile
The deploy has failed with an error: Exception while executing as deploy@104.236.193.148: rake exit status: 1
rake stdout: Nothing written
rake stderr: rake aborted!
LoadError: cannot load such file -- carrierwave/processing/mime_types
/home/deploy/aldrinclement/shared/bundle/ruby/2.3.0/gems/activesupport- 4.2.6/lib/active_support/dependencies.rb:274:in `require'
/home/deploy/aldrinclement/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
/home/deploy/aldrinclement/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/deploy/aldrinclement/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/home/deploy/aldrinclement/releases/20170103201423/app/uploaders/author_image_uploader.rb:1:in `<top (required)>'

载波.rb
if Rails.env.production? || Rails.env.staging?
CarrierWave.configure do |config|
config.fog_credentials = {
provider: 'AWS',
aws_access_key_id: Rails.application.secrets.AWS_ACCESS_KEY_ID,
aws_secret_access_key: Rails.application.secrets.AWS_SECRET_ACCESS_KEY,
region: Settings.aws_region
}
config.fog_directory = Settings.aws_s3_bucket_name
config.permissions = 0666
config.directory_permissions = 0777
config.storage = :fog
end
end

CarrierWave::SanitizedFile.sanitize_regexp = /[^[:word:]\.\-\+]/

我的 secrets.yml 定义了 AWS key - 我遇到了丢失的 aws key ,并通过在我的 deploy.rb 文件中符号链接(symbolic link)的 secrets.yml 解决了这个问题。我在我的 Gemfile 中使用carrierwave 1.0.0。

最佳答案

mime_types 文件已从carrierwave 中删除,请参阅commit .

你可能有 require 'carrierwave/processing/mime_types'app/uploaders/author_image_uploader.rb 的顶部.您需要从项目中删除carrierwave mime_types 引用并切换到mime-types。 gem,它现在是carrierwave 的运行时依赖项,或者回滚到以前的carrierwave 版本。

关于ruby-on-rails - Capistrano - 载波加载错误 : cannot load such file -- carrierwave/processing/mime_types,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41451706/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com