Daniel B
Daniel B

Reputation: 82

Ruby on Rails - Bootstrap-rails-slider - Uncaught SyntaxError

I've got an issue with bootstrap-slider-rails

I installed the gem as instructed on the github wiki. With the added lines as follows:

application.scss:

@import "bootstrap-sprockets";
@import "bootstrap";
@import "jquery-ui";
@import "font-awesome";
@import "select2";
@import "select2-bootstrap";
@import "bootstrap-slider";

application.js

//= require jquery
//= require bootstrap-sprockets
//= require jquery_ujs
//= require jquery-ui
//= require_tree .
//= require bootstrap-slider
//= require select2

I get the following error in my console:

Uncaught SyntaxError: Unexpected identifier

When i click on sources to open the contents of the .js file for bootstrap-slider it says:

Not Found

I'm not sure why it can't find the file or its contents as the installation seems basic.

This might be an easy-fix issue, i thought i'd get some fresh eyes on it before i spend many more hours staring at this..

Any help is appreciated. Thanks.

Upvotes: 0

Views: 72

Answers (1)

Igor Ivancha
Igor Ivancha

Reputation: 3451

Try require bootstrap-slider and select2 in application.js above string //= require_tree .

//= require jquery
//= require bootstrap-sprockets
//= require bootstrap-slider
//= require select2
//= require jquery_ujs
//= require jquery-ui
//= require_tree .

Upvotes: 1

Related Questions