rubymonolith / superform

Build highly customizable forms in Rails
MIT License
263 stars 14 forks source link

superform uninitialized constant ApplicationComponent (NameError) #12

Closed trndav closed 5 months ago

trndav commented 6 months ago

Just created new rails app for this project:

bundle add superform rails g superform:install

and I get:

PS C:\rails\superform> rails g superform:install
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/superform-0.4.2/lib/superform/rails.rb:4:in `<module:Rails>': uninitialized constant ApplicationComponent (NameError)

    Component = ::ApplicationComponent
                ^^^^^^^^^^^^^^^^^^^^^^
        from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/superform-0.4.2/lib/superform/rails.rb:2:in `<module:Superform>'
..... other lines 

Using Rails 7.0.8 and Ruby 3.2.2

How to solve this problem?

aydinkazim commented 5 months ago

same issue 😕

ruby "3.2.2"
gem "rails", "~> 7.1.3"
gem "superform", "~> 0.4.3"
bradgessler commented 5 months ago

I just ran the following on macOS and it works:

rails new crap-app
cd crap-app
bundle add superform
rails g superform:install

Are you both running Windows?

Can you verify that phlex-rails is in your Gemfile and that the rails g phlex:install command successfully completed?

aydinkazim commented 5 months ago

I just realized that I was getting an error because I named the folder 'superform' 😑🙄🫣 There is no problem now; it's working. Thank you for your quick response, you're very kind.

bradgessler commented 5 months ago

Closing this issue for now. Re-open it if it's still a problem!