如何在 Rails 3.0.x 中使用链轮 2 [英] How to use Sprockets 2 with Rails 3.0.x

查看:44
本文介绍了如何在 Rails 3.0.x 中使用链轮 2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用这些 gists 使 Sprockets 2.0beta 与 Rails 3.0.5 应用程序一起工作,方式与它在 Rails 3.1 中的本机工作方式类似.到目前为止彻底失败——我的应用正在寻找正确的路由和文件,并加载扩展 Sprockets::Environment 的初始化程序,但它没有解析我的 application.js 中的//= require 'phu' 行.

I'm trying to use these gists to get Sprockets 2.0beta to work with a Rails 3.0.5 app in a similar way to how it works natively in Rails 3.1. Failing thoroughly so far--my app is finding the correct routes and files, and loading the initializer that extends Sprockets::Environment, but it's not parsing the //= require 'phu' lines in my application.js.

谁能告诉我有关带有 Rails 3.0 的链轮 2 的信息?

Can anyone enlighten me about Sprockets 2 with Rails 3.0?

推荐答案

我使用了相同的要点作为基础,并且效果很好.不过我做了一些改变.也许您可以尝试一下,看看是否有帮助:https://gist.github.com/1112393

I have used the same gists as a basis, and it works fine. I have made some changes though. Maybe you can try that, see if it helps: https://gist.github.com/1112393

ps:我猜你已经自己解决了,因为已经一个月了......我个人还有一个问题:如何在 Rails 3.0.x 中使用 Sprockets 2(如何使用预编译资产)如果你已经解决了它,或者找到了另一种方法来提高生产效率,你能帮我吗?谢谢.

ps: I guess you solved it yourself since it's been a month... I personally have another problem: How to use Sprockets 2 with Rails 3.0.x (how to use precompiled assets) If you solved it already, or found another way to make this efficient on production, could you help me? Thanks.

这篇关于如何在 Rails 3.0.x 中使用链轮 2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆