simple_form
simple_form copied to clipboard
Simple_form generator for Bootstrap 5 problem
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 ).
And the HTML output with .form-group
wrapper.

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.
Encountered this as well. Looks like the released gem contains an outdated generator for bootstrap.
My temporary working
- Change the Gemfile entry to
gem "simple_form", github: "heartcombo/simple_form", branch: "main"
-
bundle install
-
rails generate simple_form:install --bootstrap
- Change the Gemfile entry back to
gem "simple_form"
-
bundle install
Yes, Bootstrap 5 is not released yet. You can use what @spilth suggested for now, thanks!
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?