0

I am relatively new to rails, I found this gem bootstrap-sass which seems to be very nice in the layout. But I want to make the Carousel js plugin work. I found it was documented in the website but I don't quite understand where I need to put

// Loads all Bootstrap javascripts

//= require bootstrap

Thanks,

Clone
  • 919
  • 4
  • 11
  • 22

1 Answers1

3

If you're using rails >= 3.1, add that line to your application.js file (or whatever file you're including in your layout), normally located in app/assets/javascripts

This is my typical base app/assets/javascripts/application.js in any new app.

//= require jquery
//= require jquery-ui
//= require jquery_ujs
//= require bootstrap
Matenia Rossides
  • 1,406
  • 9
  • 35
  • Ok Thanks!, and do you use Carousel? because i added `//=require bootstrap` but still the images doesnt seem to load. which are there inside `app/assets/images/` – Clone Jul 25 '12 at 18:20
  • yes, I have used carousel, however that feels like a different question. do you have a sample project? – Matenia Rossides Jul 25 '12 at 23:46
  • If I'm not using rails, is there a way I can import the JS, e.g. using Compass? – strangerpixel Jan 24 '14 at 13:18