升级到Rails 3.1.1之后:"undefined method`javascript_expansions'"错误 [英] After upgrading to Rails 3.1.1: "undefined method `javascript_expansions'" error

查看:61
本文介绍了升级到Rails 3.1.1之后:"undefined method`javascript_expansions'"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将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.cssapplication.js文件,即使它在assets子文件夹中也是如此.每次尝试获取任何文件时,我都会遇到路由错误.

Also my asset pipeline doesnt seem to work. Its not loading the application.cssand 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屋!

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