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

Simple_form generator for Bootstrap 5 problem #1787

Closed
hoangdd opened this issue Aug 3, 2022 · 3 comments
Closed

Simple_form generator for Bootstrap 5 problem #1787

hoangdd opened this issue Aug 3, 2022 · 3 comments

Comments

@hoangdd
Copy link

hoangdd commented Aug 3, 2022

Environment

  • Ruby [2.7.5]
  • Rails [7.0.3.1]
  • Simple Form [5.1.0]
  • Bootstrap gem [5.2.0]

Current behavior

After running rails generate simple_form:install --bootstrap, I got initializer config config/initializers/simple_form_bootstrap.rb file look likes Bootstrap 4 compatible configuration( with .form-group wrapper ).
Screen Shot 2022-08-03 at 2 56 05 PM

And the HTML output with .form-group wrapper.

Screen Shot 2022-08-03 at 2 59 30 PM

Expected behavior

Expecting generator can create config file with bootstrap 5 support content. Same as example at simple_form-bootstrap/blob/main/config/initializers/simple_form_bootstrap.rb

Problem demo

https://github.com/hoangdd/simple_form_demo

Thanks for your amazing work.

@spilth
Copy link

spilth commented Aug 8, 2022

Encountered this as well. Looks like the released gem contains an outdated generator for bootstrap.

My temporary working

  1. Change the Gemfile entry to gem "simple_form", github: "heartcombo/simple_form", branch: "main"
  2. bundle install
  3. rails generate simple_form:install --bootstrap
  4. Change the Gemfile entry back to gem "simple_form"
  5. bundle install

@nashby
Copy link
Collaborator

nashby commented Sep 18, 2022

Yes, Bootstrap 5 is not released yet. You can use what @spilth suggested for now, thanks!

@nashby nashby closed this as completed Sep 18, 2022
@trevorfoxsoft
Copy link

This appears to still be an issue, I've just hit it with the latest version from RubyGems, and fixed it with this method. Is this known?

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

No branches or pull requests

4 participants