bootstrap-generators icon indicating copy to clipboard operation
bootstrap-generators copied to clipboard

Not working

Open enriquemorenotent opened this issue 9 years ago • 6 comments

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???

enriquemorenotent avatar Dec 17 '15 17:12 enriquemorenotent

+1 Experience the same problem on Rails 4.2.5.

Jeiwan avatar Dec 23 '15 07:12 Jeiwan

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.

Jeiwan avatar Dec 23 '15 09:12 Jeiwan

+1 on Spring Issue

slavakurilyak avatar Mar 09 '16 17:03 slavakurilyak

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 avatar Mar 20 '16 22:03 coreyaus

@coreyaus you don't need to remove bootstrap-sass, just kill spring with

spring stop

duleorlovic avatar Apr 13 '16 08:04 duleorlovic

Legend - that makes sense. Thanks @duleorlovic

coreyaus avatar Apr 13 '16 13:04 coreyaus