Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8821125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:46:33+00:00 2026-06-14T05:46:33+00:00

Ok, so my asset pipeline has suddenly started acting up on my development machine.

  • 0

Ok, so my asset pipeline has suddenly started acting up on my development machine. JS functions that previously worked are now throwing “not a function” errors.. I know I must be doing something wrong. A minute ago the datatables jquery function was working, then it was throwing an error, then it was working, and now it’s not working or throwing an error.

Here is my application.js

//= require jquery
//= require jquery-ui
//= require jquery_ujs
//= require_self
//= require_tree .
//= require dataTables/jquery.dataTables
//= require dataTables/jquery.dataTables.bootstrap
//= require bootstrap
//= require bootstrap-tooltip
//= require bootstrap-popover
//= require bootstrap-tab
//= require bootstrap-modal
//= require bootstrap-alert
//= require bootstrap-dropdown
//= require jquery.ui.addresspicker
//= require raty
//= require jquery.alphanumeric
//= require jquery.formrestrict
//= require select2
//= require chosen/chosen.jquery
//= require highcharts
//= require jquery.lazyload

Here is some of my layout header:

  <%= stylesheet_link_tag "application", media: "all" %>
  <%= yield(:scripthead) %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>    
  <%= yield(:head) %>   

Above I am using the yield to load up online scripts from google as they’re only needed on some pages, and generally slow down the site if included in the application layout. I tried removing the yield but things were still broken, even after clearing the browser cache and running rake assets:clean (just to be on the safe side).

Here’s what shows up between CSS and metatags (for a page with nothin in the yield scripthead):

  <script src="/assets/jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery-ui.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script>
<script src="/assets/application.js?body=1" type="text/javascript"></script>
<script src="/assets/aidmodels.js?body=1" type="text/javascript"></script>
<script src="/assets/audio.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-alert.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-dropdown.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-modal.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-popover.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-tab.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-tooltip.js?body=1" type="text/javascript"></script>
<script src="/assets/branches.js?body=1" type="text/javascript"></script>
<script src="/assets/charts.js?body=1" type="text/javascript"></script>
<script src="/assets/chosen/backup_chosen.jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/chosen/chosen.jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/consumers.js?body=1" type="text/javascript"></script>
<script src="/assets/dispensers.js?body=1" type="text/javascript"></script>
<script src="/assets/favorites.js?body=1" type="text/javascript"></script>
<script src="/assets/features.js?body=1" type="text/javascript"></script>
<script src="/assets/generic_styles.js?body=1" type="text/javascript"></script>
<script src="/assets/gmaps4rails/gmaps4rails.base.js?body=1" type="text/javascript"></script>
<script src="/assets/gmaps4rails/gmaps4rails.bing.js?body=1" type="text/javascript"></script>
<script src="/assets/gmaps4rails/gmaps4rails.googlemaps.js?body=1" type="text/javascript"></script>
<script src="/assets/gmaps4rails/gmaps4rails.mapquest.js?body=1" type="text/javascript"></script>
<script src="/assets/gmaps4rails/gmaps4rails.openlayers.js?body=1" type="text/javascript"></script>
<script src="/assets/highcharts.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery-ui-1.8.18.custom.min.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.alphanumeric.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.formrestrict.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.lazyload.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.ui.addresspicker.js?body=1" type="text/javascript"></script>
<script src="/assets/likes.js?body=1" type="text/javascript"></script>
<script src="/assets/messages.js?body=1" type="text/javascript"></script>
<script src="/assets/overalls.js?body=1" type="text/javascript"></script>
<script src="/assets/pages.js?body=1" type="text/javascript"></script>
<script src="/assets/questions.js?body=1" type="text/javascript"></script>
<script src="/assets/raty.js?body=1" type="text/javascript"></script>
<script src="/assets/reviews.js?body=1" type="text/javascript"></script>
<script src="/assets/sessions.js?body=1" type="text/javascript"></script>
<script src="/assets/styles.js?body=1" type="text/javascript"></script>
<script src="/assets/tickets.js?body=1" type="text/javascript"></script>
<script src="/assets/universities.js?body=1" type="text/javascript"></script>
<script src="/assets/users.js?body=1" type="text/javascript"></script>
<script src="/assets/dataTables/jquery.dataTables.js?body=1" type="text/javascript"></script>
<script src="/assets/dataTables/jquery.dataTables.bootstrap.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-transition.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-affix.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-button.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-carousel.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-collapse.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-scrollspy.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap-typeahead.js?body=1" type="text/javascript"></script>
<script src="/assets/bootstrap.js?body=1" type="text/javascript"></script>
<script src="/assets/select2.js?body=1" type="text/javascript"></script>

From application.rb:

config.assets.initialize_on_precompile = false
# Enable the asset pipeline
config.assets.enabled = true
config.action_controller.assets_dir = "#{File.dirname(File.dirname(__FILE__))}/public"

# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'

I’m sorry, I’m not sure what else to include to help with this puzzle, but any advise would be appreciated. I was having no problems before I started trying to upload to heroku and now everything’s gone haywire.

EDIT:

In the console at the moment I’m seeing

Uncaught TypeError: Cannot read property 'Constructor' of undefined bootstrap-popover.js:33
Uncaught ReferenceError: google is not defined jquery.ui.addresspicker.js:25
Uncaught TypeError: Object [object Object] has no method 'popover' overall:476

EDIT 2:

Thanks to one of the comments below I was able to figure this out. I had to re-shuffle the application.js includes to make more sense:

//= require jquery
//= require jquery-ui
//= require jquery_ujs
//= require bootstrap
//= require bootstrap-tooltip
//= require bootstrap-popover
//= require bootstrap-tab
//= require bootstrap-modal
//= require bootstrap-alert
//= require bootstrap-dropdown
//= require dataTables/jquery.dataTables
//= require dataTables/jquery.dataTables.bootstrap
//= require jquery.ui.addresspicker
//= require raty
//= require jquery.alphanumeric
//= require jquery.formrestrict
//= require select2
//= require chosen/chosen.jquery
//= require highcharts
//= require jquery.lazyload
//= require_self
//= require_tree .

OMG, this is driving me bananas.. No, it still isn’t working. That last edit had everything working properly, but then I ran rake assets:precompile again and pushed to heroku.. It wasn’t working on Heroku again.. and believe it or not, when I got back to my localhost version it was broken again, and is now throwing up different errors and not loading datatables, again!

Uncaught ReferenceError: google is not defined jquery.ui.addresspicker.js:25
Uncaught ReferenceError: google is not defined application.js:26
Uncaught TypeError: Object [object Object] has no method 'lazyload' overall:496
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:46:34+00:00Added an answer on June 14, 2026 at 5:46 am

    Are you sure you didn’t forget a semicolon somewhere in the JS? The asset pipeline doesn’t do any code cleaning…

    Take a look in your browser’s JS console to see where the errors are spitting up…

    Edit: Ok, I think see what’s up. Try taking out the require_tree at the end and manually load any other JS files you haven’t explicitly stated. What ends up happening is the require_tree overrides any previous requires that were explicitly listed and ends up loading them in alphabetical order.

    ALSO, I don’t know what gem you’re using for bootstrap.js (or if you even are using one), but also try using twitter/bootstrap instead of just bootstrap

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Rails (3.1.3 with asset pipeline) application that will be deployed as
In Rails 3.1 development mode (when using the asset pipeline), images served out of
Page loading on my development machine has fallen through the floor since upgrading to
I'm using Rails' asset pipeline to concatenate all my CSS/JS (although I imagine the
I'm adding Asset Pipeline to my Heroku hosted Rails 3.1 App, and when I
I am trying to upgrade to cedar / asset pipeline and am stuggling with
I am using Rails 3.2 with asset pipeline. I am trying to add some
Is there an easy way to you this with the asset pipeline and deploying
I have a rails 3.2.6 app and I am using the asset pipeline and
I'm successfully using assets pipeline for months. Now I would like to load some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.