Skip to content

require_dependency in now deprecated and will be removed in Rails 9 #2588

@adrienpoly

Description

@adrienpoly

I was trying to upgrade an app to use Rails edge version and we are getting lots of Rails deprecation warnings. require_dependency is now deprecated and will be removed in Rails 9. ViewComponent code base has a call to require_dependency in

Dir["#{preview_path}/**/*preview.rb"].sort.each { |file| require_dependency file }

Associated Rails PR rails/rails#56992

Steps to reproduce

Any Rails app using main version

Expected behavior

Actual behavior

Backtrace:

System configuration

Rails version: Rails edge

Ruby version:

Gem version:

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions