Heroku + Rails 3.1:asset_path undefined? [英] Heroku + Rails 3.1: asset_path undefined?
本文介绍了Heroku + Rails 3.1:asset_path undefined?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试将一个rails 3.1.3应用程序部署到heroku,但浏览页面时仍然出现以下错误:
ActionView :: Template :: Error(未定义的方法`asset_path'为#<#< Class:0x00000002ecd630>:0x00000002e52480>):
我使用heroku推荐的雪松堆栈。任何想法,为什么我得到这个问题?我必须做一些更多的配置吗?
提前致谢!
编辑: strong>再次运作。我忘了在application.rb中添加require'sprockets / railtie'... 你忘了添加在application.rb
中需要'sprockets / railtie'
i try to deploy a rails 3.1.3 app to heroku but keep getting the following error when browsing the pages:
ActionView::Template::Error (undefined method `asset_path' for #<#<Class:0x00000002ecd630>:0x00000002e52480>):
i use the "cedar" stack as recommended by heroku. any idea why i get this issue? do i have to make some more configuration?
thanks in advance!
EDIT: works again. i forgot to add "require 'sprockets/railtie'" in the application.rb...
解决方案
You forgot to add "require 'sprockets/railtie'" in the application.rb
这篇关于Heroku + Rails 3.1:asset_path undefined?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文