如何在 Rails 3.1 中使用 wijmo
有人可以提供一种让 Wijmo 使用 Rails 3.1 的实用方法吗?
我认为最好的方法是将下载的 Wijmo 文件夹及其所有内容转储到 vender/assets
目录中,然后以某种方式仅引用所需的文件。但资产管道有点挑剔,想要加载所有文件(包括开发文件等)。
我想我真的应该正确做功课并彻底了解资产管道,但如果有人能向我展示一种快速、干净的方法来启动并运行安装了 Wijmo 的普通 Rails 3.1 应用程序,我将不胜感激。我需要涵盖开发和生产模式的解决方案。
谢谢。
Can someone provide a practical way of getting Wijmo working with Rails 3.1
I would think the best way would be to dump the downloaded Wijmo folder and all of its contents in the vender/assets
directory and then somehow only referencing the files that are needed. But the asset pipeline is a bit picky and wants to load ALL files (including development files etc).
I guess I should really be doing my homework properly and thoroughly understanding the assets pipeline, but I would appreciate if someone could show me a fast and clean way of getting a vanilla Rails 3.1 app up and running with Wijmo installed. I would need the solution to cover both development and production mode.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IMO,最好的方法是使用 CDN 引用页面中所需的脚本/样式表。您可以在布局模板中引用它,以便可以在任何地方使用它。
您可以在此处获取要使用的参考片段:http://wijmo.com/downloads/cdn/
您可能还想尝试引用 v2 Beta,因为现在的引用较少。
IMO, The best way would be to just reference the scripts/stylesheets needed in a page using CDN. You can reference it in a layout template so it can be used anywhere.
You can get the reference snippet to use here: http://wijmo.com/downloads/cdn/
You also might want to try referencing the v2 Beta since there are now fewer references.