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');
}
有没有办法有主题加载自动售货机在资产管道中,而不必单独初始化它?