3
我在Rails應用程序中運行Galleria.IO的JavaScript庫,並且在開發過程中一切正常,並且在我專門包含Galleria代碼的頁面上生產。但是,當你打的沒有代碼的頁面,它不斷拋出這樣的錯誤Galleria JS不能在Rails流水線生產中工作
No theme CSS loaded
Fatal error: Theme CSS could not load after 20 sec. Please download the latest theme at http://galleria.io/customer/
我已經列入我管線的Galleria文件:
// application.js
//= require galleria.min
//= require galleria.classic.min
/* application.css
*= require galleria.classic
*/
下面事實上確實初始化畫廊正確的網頁上,那裏是一個#galleria
元素,但拋出上述錯誤在其他地方:
if ($("#galleria").length == 1) {
Galleria.loadTheme('/assets/galleria.classic.min.js');
Galleria.configure({
debug: false,
// imageCrop: true,
dummy: '/assets/fallback/large_default.png',
transition: 'fade'
});
Galleria.run('#galleria');
}
有沒有辦法有主題加載自動售貨機在資產管道中,而不必單獨初始化它?