HappyFunCorp / happy_seed

A seed for planting new apps.
http://seed.happyfuncorp.com
MIT License
119 stars 22 forks source link

Gems that add to the asset pipeline seems to not work. #44

Closed cromulus closed 9 years ago

cromulus commented 9 years ago

For example: in a brand new happy_seed install, adding https://github.com/icicletech/bootstrap-tokenfield-rails. the application.js imports the javascript file, but importing into application.css.scss fails:

@import 'bootstrap-tokenfield';

and

//= require 'bootstrap-tokenfield';

both fail.

Any idea about how to import the plugin css?

Thanks!

wschenk commented 9 years ago

I was able to add this. In the Gemfile, add

gem 'bootstrap_tokenfield_rails'

In application.js add

//= require bootstrap-tokenfield

In application.scss add

@import 'bootstrap-tokenfield';

Then in an html view add:

%input.tokenize{ type: "text" }

And in the console (or add to application.js):

$('input.tokenize').tokenfield();

That worked for me.

cromulus commented 9 years ago

Ack! Yes, I see the mistake I made. Sorry to bother you!