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

Bug: Using with haml #86

Closed
jonatasrancan opened this issue Aug 20, 2019 · 5 comments
Closed

Bug: Using with haml #86

jonatasrancan opened this issue Aug 20, 2019 · 5 comments

Comments

@jonatasrancan
Copy link

Hi.

I'm working in a project that uses haml, isntead of erb.
When I added render_async to the project, I started getting this error undefined method 'haml_tag'.

I looked at the render_async code, and didn't find anything that might cause that conflict.
You can check the error here https://github.com/jonatasrancan/bug-render-async

Just start the app and try to access the root page, the error will show up.
Then remove render_async, from the gem file, and the app will work normally.

Any idea on why this is happening?

@jonatasrancan
Copy link
Author

jonatasrancan commented Aug 21, 2019

I tracked the problem to this line https://github.com/renderedtext/render_async/blob/master/lib/render_async.rb#L6

The simple act of just call ActionView::Base will mess up the haml gem.

I still investigating, to find a workaround

Update: The real problem is between https://github.com/k0kubun/hamlit and render_async

@nikolalsvk
Copy link
Owner

Hi @jonatasrancan, thanks for submitting the issue!

I've tried running the example app you posted on GitHub but I'm getting the same error about haml_tag not being defined. I'm investigating what could be the issue here.

Thank you for posting the repo and investigating this bug 👏

@jonatasrancan
Copy link
Author

Hi @nikolalsvk

I found this issue k0kubun/hamlit#71 (comment) it might be related with the problem.

Some how when we include the render_async helpers on ActionView::Base it is messing up with the haml helpers.

@jonatasrancan
Copy link
Author

@nikolalsvk

In the end, it was just a bad gem combination.

If you use haml and haml-rails with render_async, everything works fine.

If you are using hamlit you should use hamlit-rails. And hamlit doesn't implement haml_tag helper, so adding render_async in combination with hamlit and haml-rails just brought to light a problem that could explode anytime.

Fell free to close this issue.

@nikolalsvk
Copy link
Owner

Oh OK, thank you for looking into this issue @jonatasrancan and thank you for using render_async. Please report if you find any more issues :)

I'll close this issue since it's not related to render_async.

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

No branches or pull requests

2 participants