Skip to content

Conversation

aaronjensen
Copy link
Contributor

#188 caused an error when applications that don't load all of Rails first before loading Propshaft are started:

gems/ruby/3.3.0/gems/propshaft-0.9.0/lib/propshaft/compiler.rb:6:in `<class:Compiler>': undefined method `delegate' for class Propshaft::Compiler (NoMethodError)

  delegate :config, :load_path, to: :assembly
  ^^^^^^^^
Did you mean?  DelegateClass
        from gems/ruby/3.3.0/gems/propshaft-0.9.0/lib/propshaft/compiler.rb:4:in `<main>'
 

Propshaft appears to only load the ActiveSupport extensions it needs, which is great, but this one is now missing.

Alternatively, the use of delgate can be replaced with a method, but I have a sense that this change is more appropriate for this project.

@aaronjensen aaronjensen changed the title Require active_support's delegation module Require active_support's delegation module (fix crash introduced in 0.9.0) May 21, 2024
@theodorton theodorton merged commit c14f2b4 into rails:main May 21, 2024
@aaronjensen aaronjensen deleted the delegate-fix branch May 21, 2024 15:23
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

Successfully merging this pull request may close these issues.

2 participants