开发者

Rails 3.1 - ActionView::Template::Error (No expansion found for :application): - No expansion found for :application

开发者 https://www.devze.com 2023-04-13 04:55 出处:网络
I get this weird error while running an App with Rails 3.1 in production. In app/views开发者_如何转开发/layouts/_javascripts.html.erb (file included in app/views/layouts/application.html.erb)

I get this weird error while running an App with Rails 3.1 in production.

In app/views开发者_如何转开发/layouts/_javascripts.html.erb (file included in app/views/layouts/application.html.erb)

<%= javascript_include_tag :application %>

Is there any solution to fix it ?


I think you're not truly using Rails 3.1.

The expansion stuff was taken out of that in favour of using the Asset Pipeline. If you're still convinced that you really are using Rails 3.1, then perhaps try using a string:

<%= javascript_include_tag "application" %>

In my Rails 3.1 install, both strings and symbols work fine.


Have you recently updated rails? You might need to run rake rails:update

0

精彩评论

暂无评论...
验证码 换一张
取 消