decioferreira / bootstrap-generators

Bootstrap-generators provides Twitter Bootstrap generators for Rails
MIT License
353 stars 77 forks source link

Not working #39

Open enriquemorenotent opened 8 years ago

enriquemorenotent commented 8 years ago

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

Jeiwan commented 8 years ago

+1 Experience the same problem on Rails 4.2.5.

Jeiwan commented 8 years ago

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.

slavakurilyak commented 8 years ago

+1 on Spring Issue

coreyaus commented 8 years ago

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 :)

duleorlovic commented 8 years ago

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

spring stop
coreyaus commented 8 years ago

Legend - that makes sense. Thanks @duleorlovic