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

Erubi superclass mismatch with Haml #396

Closed
dguettler opened this issue Aug 4, 2017 · 7 comments
Closed

Erubi superclass mismatch with Haml #396

dguettler opened this issue Aug 4, 2017 · 7 comments
Labels

Comments

@dguettler
Copy link

Error description

Attempting to run a Rails application with version 2.3.0 results in the following error

.bundle/ruby/2.4.0/gems/haml-5.0.1/lib/haml/helpers/safe_erubi_template.rb:5: warning: toplevel constant Erubi referenced by ActionView::Template::Handlers::ERB::Erubi
rails aborted!
TypeError: superclass must be a Class (Module given)
.bundle/ruby/2.4.0/gems/haml-5.0.1/lib/haml/helpers/safe_erubi_template.rb:5:in `<module:Haml>'
.bundle/ruby/2.4.0/gems/haml-5.0.1/lib/haml/helpers/safe_erubi_template.rb:4:in `<top (required)>'
.bundle/ruby/2.4.0/gems/activesupport-5.0.5/lib/active_support/dependencies.rb:293:in `require'
.bundle/ruby/2.4.0/gems/activesupport-5.0.5/lib/active_support/dependencies.rb:293:in `block in require'

Possible other conflicting dependencies

  • Haml

Affected version

  • 2.3.0

Not affected version

  • 2.2.0
@dguettler
Copy link
Author

Cross-linking haml/haml#946

@RobinDaugherty
Copy link
Member

RobinDaugherty commented Aug 7, 2017

@dguettler can you test adding Erubis directly to your Gemfile? It seems like it might be caused by the complete removed of Erubis.

@RobinDaugherty RobinDaugherty changed the title Erubi superclass mismatch Erubi superclass mismatch with Haml Aug 7, 2017
@tmnsun
Copy link

tmnsun commented Aug 8, 2017

@RobinDaugherty adding Erubis to Gemfile solves the issue.

@RobinDaugherty
Copy link
Member

RobinDaugherty commented Aug 8, 2017

This is an bug in haml caused when erubi is in the bundle along with Rails prior to 5.1. I've submitted haml/haml#948 to fix this. Can you try using my fork of haml in your project and report your results in that pull request?

gem 'haml', github: 'RobinDaugherty/haml', branch: 'patch-1'

@dguettler
Copy link
Author

@RobinDaugherty adding Erubis did not solve the issue for me.
Your patch-1 branch works fine though. Thanks again for digging into this.

@907th
Copy link

907th commented Aug 17, 2017

@dguettler patch-1 merged and deleted but bug is still here. Waiting for haml/haml#952

@RobinDaugherty
Copy link
Member

haml version 5.0.2 includes a fix for Erubi with older versions of Rails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants