bootstrap-generators
bootstrap-generators copied to clipboard
Not working
I have followed the steps in the README step by step, but when I type:
rails generate scaffold post title body:text published:boolean
I still get the old scaffolfing, with class="field"
instead class="form-group"
, even though the file lib/templates/erb/scaffold/_form.html.erb
looks alright. There is actually not one class="field"
inside my whole project folder, but I still get the other class.
What is going on???
+1 Experience the same problem on Rails 4.2.5.
It seems the problem was caused by Spring: after running rails generate bootstrap:install
you need to restart application for it to see templates in lib/templates
. Because Spring was always running, the app didn't see the templates.
+1 on Spring Issue
I couldn't get this working on Rails 4.2.5 initially either - even if I made sure to restart my application after running the rails generate bootstrap:install
command (as per the comments above)... Then I realised that I still had the line: gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6'
in my Gemfile.
It would seem that adding the bootstrap-generators
gem isn't enough
gem 'bootstrap-generators', '~> 3.3.4'
We also need to remove the boostrap-sass
gem
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6'
Confirmation / correction of this would be welcome :)
@coreyaus you don't need to remove bootstrap-sass
, just kill spring with
spring stop
Legend - that makes sense. Thanks @duleorlovic