Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incompatible with rails 7.2 #2751

Closed
ssugiyama opened this issue Aug 16, 2024 · 3 comments
Closed

incompatible with rails 7.2 #2751

ssugiyama opened this issue Aug 16, 2024 · 3 comments

Comments

@ssugiyama
Copy link

carrierwave version: 3.0.7

In production environment the following error occurs.

% RAILS_ENV=production rails s
=> Booting Puma
=> Rails 7.2.0 application starting in production 
=> Run `bin/rails server --help` for more startup options
Exiting
/usr/local/rvm/gems/default/gems/carrierwave-3.0.7/lib/carrierwave/uploader/configuration.rb:163:in `fog_provider=': private method `warn' called for class ActiveSupport::Deprecation (NoMethodError)
        from /workspaces/yoka-server/api_root/config/initializers/carrierwave.rb:5:in `block in <main>'
        from /usr/local/rvm/gems/default/gems/carrierwave-3.0.7/lib/carrierwave/uploader/configuration.rb:177:in `configure'
        from /usr/local/rvm/gems/default/gems/carrierwave-3.0.7/lib/carrierwave.rb:14:in `configure'
        from /workspaces/yoka-server/api_root/config/initializers/carrierwave.rb:3:in `<main>'
(snip)
@nilshaebel
Copy link

In my case CarrierWave.deprecator.warn has been called due to having a (deprecated) extension_whitelist method in my Uploader. Renaming the method to extension_allowlist fixed the issue for me.

Example:

In app/uploaders/foo_uploader.rb, replace:

def extension_whitelist
  %w(...)
end

with:

def extension_allowlist
  %w(...)
end```

@ssugiyama
Copy link
Author

I have no methods named xxx_whitelist nor xxx_blacklist, but the error occurs.

@mshibuya
Copy link
Member

mshibuya commented Sep 1, 2024

Fixed by b25477d, which is included in the latest release 3.1.0.beta.

@mshibuya mshibuya closed this as completed Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants