After upgrading to Rails 3.1.1: “undefined method `javascript_expansions'” error

风格不统一 提交于 2019-12-02 15:03:48

问题


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

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

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.


回答1:


I got the exact same error, after removing tinymce and running bundle install everything was running smooth, so heat up the coffee machine and try to remove suspect JavaScripts.

Maybe it was just a lucky shoot he he




回答2:


I solved this problem adding the therubyracer gem to the Gemfile and runned bundle install. Thats it...



来源:https://stackoverflow.com/questions/8138368/after-upgrading-to-rails-3-1-1-undefined-method-javascript-expansions-error

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