1

I bought a HTML/CSS bootstrap template from themeforest.net. And I'm trying to import it into rails so I could start editing it and developing further more.I followed all of the guides on how to add assets (js,images,fonts and css) into rails and rendering partials from application.html.erb , however, when I start rails site loads partially and when I check the Web developer console in Chrome it shows different errors with .js files. Here is the screenshot

Uncaught TypeError: Object [object Object] has no method 'superfish' script.js?body=1:2
(anonymous function) script.js?body=1:2

jQuery.fn.extend.addEventListener jquery.ui.map.js?body=1:341
jQuery.fn.(anonymous function) jquery.ui.map.js?body=1:370
(anonymous function) sliderhome.js?body=1:15

Uncaught ReferenceError: google is not defined jquery.ui.map.js?body=1:341
jQuery.fn.extend.addEventListener jquery.ui.map.js?body=1:341
jQuery.fn.(anonymous function) jquery.ui.map.js?body=1:370
(anonymous function) sliderhome2.js?body=1:15

Uncaught ReferenceError: google is not defined jquery.ui.map.js?body=1:341
jQuery.fn.extend.addEventListener jquery.ui.map.js?body=1:341
jQuery.fn.(anonymous function) jquery.ui.map.js?body=1:370
(anonymous function) sliderhome4.js?body=1:15

Uncaught ReferenceError: google is not defined jquery.ui.map.js?body=1:341
jQuery.fn.extend.addEventListener jquery.ui.map.js?body=1:341
jQuery.fn.(anonymous function) jquery.ui.map.js?body=1:370
(anonymous function) switcher.js?body=1:18

Uncaught ReferenceError: google is not defined jquery.ui.map.js?body=1:341
jQuery.fn.extend.addEventListener jquery.ui.map.js?body=1:341
jQuery.fn.(anonymous function) jquery.ui.map.js?body=1:370
(anonymous function) contact.js?body=1:6
l jquery.js?body=1:703
c.fireWith jquery.js?body=1:747
v.extend.ready jquery.js?body=1:514
A

Id very much appreciate any kind of help regarding this problem. Thanks in advance

madth3
  • 7,275
  • 12
  • 50
  • 74
  • Which guides are you following? Are you using a gem to add Bootstrap to Rails (bootstrap-sass or twitter-bootstrap-rails)? Typically, ThemeForest themes include Bootstrap as part of the CSS and JS with additional customization, intended to go in the public/ directory. That makes it difficult to integrate with the Rails asset pipeline. – Daniel Kehoe Aug 04 '13 at 16:09
  • Daniel, thanks for answering. Im using gem 'bootstrap-sass', '2.1'. And for the guides, well googled around and found the way to deal with the asset pipeline. I've been using some other bootstrap templates with less jQuery and they were all working fine, but this one that I need won't. By difficult do you mean quite impossible ? – aransadorien Aug 04 '13 at 16:32
  • there might be js ordering problem in application.js – sunny1304 Aug 04 '13 at 18:21
  • I am getting jarvismenu is not defined -- error. but jarvismenu is defined in same js file like: $.fn.extend({ jarvismenu : function(options) { ... }; }); . Don't know what I am missing :( – przbadu Jan 09 '14 at 12:46

1 Answers1

0

For theme integration from themeforest ..instead of remove gem and include bootstarp css file in assets/css folder you can also add custom css this way and as per your screenshot it seems that your js ordering is creating some problem so check out in application.js for your js includes ...

ravisuhag
  • 1,778
  • 1
  • 11
  • 16
  • //= require jquery //= require jquery_ujs //= require jquery-fileupload //= require bootstrap //= require_tree . I already have that included in application.js – aransadorien Aug 04 '13 at 22:56