Monday, 15 July 2013

ruby on rails - bootstrap:themed error - not generating the proper views -



ruby on rails - bootstrap:themed error - not generating the proper views -

rails: 3.2.6 twitter-bootstrap-rails (2.2.3, 2.1.0)

i did following:

rails generate bootstrap:install static -s

i generated scaffolding certification follows:

rails generate scaffold certification id:integer user_id:integer name:string description:string location:string status:string --skip-stylesheets -s

then tried generate twitter bootstrap views follows:

rails generate bootstrap:themed certifications -f -s

which gave me next error:

undefined method `fields' #<class:0x007fe5e7282060>

and no changes made certifications views. ideas?

i had similar issues, because working mix of mongoid , active records. guess somehow there conflicts while using generator , couldn't find fields method anymore.

the solution me reinstall twitter-bootstrap-rails gem following:

gem "twitter-bootstrap-rails", :git => 'https://github.com/seyhunak/twitter-bootstrap-rails.git'

also, not forget run

rake db:migrate

after

rails generate scaffold ...

for working mongoid, additional tip: everytime have generate scaffold active record, comment:

#gem "mongoid", "~> 3.0" #gem "composite_primary_keys"

then, generate, uncomment

ruby-on-rails twitter-bootstrap

No comments:

Post a Comment