升级到Rails 3.1.1之后:"undefined method`javascript_expansions'"错误 [英] After upgrading to Rails 3.1.1: "undefined method `javascript_expansions'" error
问题描述
我已经将Rails从3.0.10升级到3.1.1,现在我收到了以下错误消息:
Ive upgraded rails from 3.0.10 to 3.1.1 and now Im getting the following Error:
undefined method 'javascript_expansions' for ActionView::Helpers::AssetTagHelper:Module
但不是在每个页面上,仅涉及一些页面.我已经用谷歌搜索了,但是什么也没找到!我正在运行ruby 1.9.2 ...
but not on every page, just some pages are involved. I googled it already but I didnt find anything! Im running ruby 1.9.2 by the way...
我的资产管道也似乎不起作用.它不会加载application.css
和application.js
文件,即使它在assets
子文件夹中也是如此.每次尝试获取任何文件时,我都会遇到路由错误.
Also my asset pipeline doesnt seem to work. Its not loading the application.css
and application.js
file even its in the assets
subfolders. Im getting a routing error each time I try to fetch any of the files.
推荐答案
我解决了此问题,将therubyracer
gem添加到Gemfile
并运行了bundle install
.就这样...
I solved this problem adding the therubyracer
gem to the Gemfile
and runned bundle install
. Thats it...
这篇关于升级到Rails 3.1.1之后:"undefined method`javascript_expansions'"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!