我將一些代碼推送到了heroku,並且我的應用程序崩潰了。 我得到這個錯誤,在瀏覽器控制檯:rails:application.css加載資源失敗:服務器響應狀態爲404(未找到)
https://agile-mesa-47878.herokuapp.com/javascripts/application.js無法加載資源:服務器與無法加載資源的404 (未找到)2 https://agile-mesa-47878.herokuapp.com/stylesheets/application.css 狀態迴應:該服務器的狀態迴應404 (未找到)
今天發生了第二次。首先,我只是將新代碼推送到服務器,並開始工作。但現在我開始擔心是否有什麼問題。 當地正常工作
My application.js file
// 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 any plugin's vendor/assets/javascripts directory 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/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery.turbolinks
//= require jquery_ujs
//= require bootstrap
//= require_tree .
//= require turbolinks
我application.css文件
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require bootstrap
*= require_tree .
*= require_self
*= require_custom
*/
你能告訴我們你是如何有這個在您的HTML? '<%= javascript_include_tag'應用程序'%>'? – Leito