這是我在Heroku上的應用程序:http://mighty-brushlands-6367.herokuapp.com/,這是它應該是什麼樣子的,因爲它確實在本地:的jQuery/JavaScript的運行在本地而不是在Heroku
嗯,我做了一些谷歌搜索。我檢查這個解決方案:JQuery events are not working on heroku in production but work in development和其他。
我繼續運行heroku run rake assets:precompile
,但仍無法獲得Heroku的效果。這就是我的application.js
的樣子:
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require bootstrap
//= require textEffect
我需要一些指導。我是一個渴望知識的新手。