1- I installed gem bootstrap_form
2- I wrote in application.css that line *= require bootstrap_form before the */
3- in my html.erb
<%= bootstrap_form_for(@guardian, :url => student_guardians_path(@student),
html: { class: 'form-horizontal' },
method: :post) do |f| %>
And I am getting the following error : undefined method
bootstrap_form_for' for #<#:0xb31a80c>`
I was getting the same error. Fixed it by replacing
gem 'bootstrap-form'
by
gem 'bootstrap_form'
in my gemfile
I recently had this issue and my problem was that bundle install seemed to be pulling v3.0.0, yet the most recent version on GitHub is listed as 2.3.0. Changing the appropriate line in my Gemfile to:
gem 'bootstrap_form', '~> 2.3.0'
Fixed the issue.
I too was getting this error until I realized that I didn't restart the rails server. When I restarted the server, the error disappeared.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With