patbenatar / rbexy

A Ruby template language and component framework inspired by JSX and React
MIT License
34 stars 5 forks source link

Rbexy Fails to Load #100

Closed zacheryph closed 2 months ago

zacheryph commented 2 months ago

Whenever trying to add Rbexy to a project you can no longer actually start up the server or console. The following error shows. This is 2.0.0.rc4. I tried on the following pairings to the same result. Zeitwerk is.... lovely.

The only way around this that I can see is to require: false in the Gemfile and require "rbexy"; require "rbexy/rails/engine" after Bundler loads everything.

Error

/Users/context/.rbenv/versions/3.2.3/lib/ruby/gems/3.2.0/gems/actionview-7.1.3.2/lib/action_view/helpers/tag_helper.rb:17:in
`<module:TagHelper>': uninitialized constant ActionView::Helpers::TagHelper::OutputSafetyHelper (NameError)

      include OutputSafetyHelper
              ^^^^^^^^^^^^^^^^^^
patbenatar commented 2 months ago

We may just need to explicitly require that file from action_view at the top of our file that uses it, like what we do here.

zacheryph commented 2 months ago

@patbenatar Yeah... I spent a good 30 minutes trying a number of different ways of not just doing require 'action_view' but I just continued to get this or other similar errors. In the end the hassle wasn't worth it.