Rails Engine 中怎样引入其他 Gem 的 assets?

zhang_xiangyu · 2012年05月07日 · 最后由 zhang_xiangyu 回复于 2012年05月08日 · 2113 次阅读

例如在我的 engine 中 //= require twitter/bootstrap 这样写提示找不到文件。

couldn't find file 'twitter/bootstrap'
(in /home/sean/projects/taurus/core/app/assets/javascripts/taurus/admin.js:1)

admin.js 是你项目里面的 js,而不是在 engine 里面的吗?而 bootstrap 是在 engine 里面的?

@cantin 谢谢,问题已经搞定了。bootstrap 是 dependency 到 engine 里的,我没有在 engine 里 require bootstrap。修改之后就解决了。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号