简体   繁体   中英

Formtastic Scaffolding Error using Formtastic Gem

I'm using ruby 1.8.7 and rails 3.2.14. I'm following the railscast video #184 on using formtastic. In there the guy uses script/generate formtastic_stylesheets . Since I'm using ruby 3.2.14 I did rails generate formtastic_stylesheets but this brings up the error: Could not find generator formtastic_stylesheets . Does anyone know the correct way to scaffold the needed stylesheets, or is there a more recent tutorial and/or gem on creating forms?

Thank you!

From the section about stylesheets in the Formtastic README:

Rails 3.1 introduces an asset pipeline that allows plugins like Formtastic to serve their own Stylesheets, Javascripts, etc without having to run generators that copy them across to the host application. Formtastic makes three stylesheets available as an Engine, you just need to require them in your global stylesheets.

# app/assets/stylesheets/application.css
*= require formtastic
*= require my_formtastic_changes`

Perhaps that's what you're looking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM