I am trying to fix an error in Rails 4 app .
The flexslider on my app doesnt work , no images loading at all. In the console it shows -
TypeError (..).flexslider
is not a function
The theme works completely fine when its not integrated in Rails .
Its a bootstrapped based theme , with following configs -
The application.css.scss file looks like the following
*= require_self
*= require font-config
*= require framework_and_overrides
*= require animate
*= require flexslider
*= require site-wide
For application.js file has the following -
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require bootstrap-sprockets
//= require flexslider
//= require cbpAnimatedHeader
//= require jqueryeasing
//= require jquerymousewheel
//= require classie
//= require scrollpage
//= require site
Tried changing their order quite a few times , but no effect. The sliders are initialized in the following way -
$(document).ready(function() {
$('#myCarousel').flexslider({
animation: "fade",
directionNav: false,
controlNav: false //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
});
$('#slider').flexslider({
animation: "fade",
directionNav: true
});
});
I am a Rails Beginner ,please throw some insight , been trying to solve it for the last few hours .
Thanks for your time .
Update : I am using RailsApps starter apps by Daniel Kehoe using composer .
Update : I have not installed flexslider using any gem , since the gem I found on rubygems website is using an older version , ie. flexslider 2.2 and I am using 2.4 .
So I am trying to do it manually .