How to use Sprockets 2 with Rails 3.0.x

孤者浪人 提交于 2020-01-03 17:14:17

问题


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.

Can anyone enlighten me about Sprockets 2 with Rails 3.0?


回答1:


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: 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.



来源:https://stackoverflow.com/questions/6422755/how-to-use-sprockets-2-with-rails-3-0-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!