Bower-rails看起来应该是交钥匙的,它适用于非常流行的库,如angular和angular-resource,但我如何添加另一个不太受欢迎但启用了bower的库?
例如- https://github.com/g00fy-/angular-datepicker、https://angular-ui.github.io/angular-google-maps/#!/
在我的Bowerfile中,我添加了
asset 'angular-datepicker', github: "g00fy-/angular-datepicker"然后运行rake bower:install。这会将这些文件与其他可用的库(angular、angular-resource等)一起安装到我的vendor/assets/bower_components文件夹中。
但是当我将路径添加到我的application.js文件时,它声称无法找到该文件。
//= require angular-datepicker我已经在我的application.rb文件中添加了bower_components的路径
config.assets.paths << Rails.root.join(‘供应商’,‘资产’,'bower_components')
如何将这些bower库添加到rails?
发布于 2015-08-17 14:43:10
看起来你必须要//= require angular-datepicker/angular-datepicker
https://stackoverflow.com/questions/26952778
复制相似问题