Heroku Rails JS pipeline issue

0

I’ve been trouble shooting this issue for a while and I’m stuck.

I’ve got a rails 4.1.0 app using Bootstrap 4. Everything is working locally, but when I push to my production heroku server, the js is compiled, but all js is broken on the page.

There are no errors in the server logs, however there are errors in the console:

Uncaught ReferenceError: Popper is not defined
at application-21bd05413e87683d1fbc6420906ba3317d416c1d0b78d17c25e793b78e405352.js:5
(index):85 Uncaught TypeError: $(…).datetimepicker is not a function
at HTMLDocument. ((index):85)
at l (application-21bd05413e87683d1fbc6420906ba3317d416c1d0b78d17c25e793b78e405352.js:2)
at Object.fireWith [as resolveWith] (application-21bd05413e87683d1fbc6420906ba3317d416c1d0b78d17c25e793b78e405352.js:2)
at Function.ready (application-21bd05413e87683d1fbc6420906ba3317d416c1d0b78d17c25e793b78e405352.js:2)
at HTMLDocument.a (application-21bd05413e87683d1fbc6420906ba3317d416c1d0b78d17c25e793b78e405352.js:1)

installed gems:

gem 'rails', '4.2.6'
gem 'sqlite3', group: :development
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'puma'
gem 'devise'
gem 'omniauth'
gem 'omniauth-facebook', '~> 4.0.0'
gem 'pg', '~> 0.18.4'
gem 'bootstrap', '~> 4.1.0'
gem 'sprockets-rails', :require => 'sprockets/railtie'
gem 'bootstrap-glyphicons'
gem 'bootstrap-select-rails'
gem 'momentjs-rails', '>= 2.9.0' 
gem 'bootstrap4-datetime-picker-rails'
gem 'client_side_validations'
gem 'validates_timeliness', '~> 4.0' 
source 'https://rails-assets.org' do

  gem 'rails-assets-tether', '>= 1.3.3'

end
group :development, :test do

  gem 'byebug'

end
group :development do

  gem 'web-console', '~> 2.0'
  gem 'spring'
end

application.js:

//=require tether
//=require popper
//=require turbolinks
//=require jquery3
//=require jquery_ujs
//=require bootstrap-sprockets
//=require_tree
//=require moment
//=require tempusdominus-bootstrap-4.js
//=require bootstrap-select
//=require rails.validations
//=require bootstrap/alert
//=require bootstrap/dropdown

Most people with similar problems were able to fix them by changing the order of the libraries in the application.js file, but I’ve tried virtually every combination moving around the jquery, bootstrap, popper stuff without any success.

I’m not sure what else to try.