JavaScript清单文件"application.js"未处理 [英] Javascript manifest file "application.js" is not processed
问题描述
我在Macbook Pro上,我创建了一个新的Rails 3.2应用程序,但是资产管道不起作用.这是我所做的:
I am on a Macbook Pro and I created a new Rails 3.2 app, but the assets pipeline does not work. Here is what I did:
$ rails version
Rails 3.2.5
$ rails new test_assets
$ cd test_assets
$ rails server
服务器启动正常,但是如果我访问http://0.0.0.0:3000/assets/application.js
,结果表明清单文件根本没有处理,它显示:
The server is started OK, but if I visit http://0.0.0.0:3000/assets/application.js
, it turns out the manifest file is not processed at all, it shows:
//... some comments ...
//= require jquery
//= require jquery_ujs
//= require_tree .
;
我尝试在其他Macbook Pro上执行完全相同的步骤.它运作良好.在该计算机上访问http://0.0.0.0:3000/assets/application.js
会显示一个包含所有内容的已编译javascript文件.
I tried to do the exactly the same steps on my other Macbook Pro. It works well. Visiting http://0.0.0.0:3000/assets/application.js
on that machine shows a compiled javascript file with all the contents.
我已阅读 http://railscasts.com/episodes/279-understanding -the-asset-pipeline 和 http://guides.rubyonrails.org/asset_pipeline.html ,然后我在网上搜索了几个小时,但毫无头绪.
I have read http://railscasts.com/episodes/279-understanding-the-asset-pipeline and http://guides.rubyonrails.org/asset_pipeline.html, and I searched for hours on the web but with no clue.
非常感谢您的帮助!
推荐答案
我遇到了同样的问题!
I had the same issue!
将Ruby从2.0.0降级到1.9.3修复了该问题
Downgrading Ruby from 2.0.0 to 1.9.3 fixed the issue
这篇关于JavaScript清单文件"application.js"未处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!