相关疑难解决方法(0)

Rails 3没有加载HAML处理程序

我在我的应用程序中遇到了Rails 3和HAML的一些问题:由于某种原因,Rails似乎没有加载处理haml文件的处理程序.每个操作都会显示与此类似的错误消息:


模板丢失了

缺少模板contact_search/index with {:formats => [:html],:handlers => [:rjs,:rhtml,:rxml,:builder,:erb],:locale => [:en,:en]} in查看路径"/ var/www/osphonebook/app/views","/ var/www/osphonebook/vendor/bundle/ruby​​/1.8/gems/devise1.3.4/app/views"


看看"处理程序"选项:它没有:haml ...

问题是这只发生在我公司设置的服务器上的生产模式中.在开发和测试模式下,它工作正常.此外,如果我在我的开发PC上以生产模式启动应用程序,它可以工作.

有关服务器的一些信息:

更新(2011年6月6日):升级到Ruby 1.9,它仍然无法正常工作.

ruby 1.9.2p0 (2010-08-18 revision 29036) [i486-linux]

Gems included by the bundle:
abstract (1.0.0)
actionmailer (3.0.7)
actionpack (3.0.7)
activemodel (3.0.7)
activerecord (3.0.7)
activeresource (3.0.7)
activesupport (3.0.7)
arel (2.0.10)
bcrypt-ruby (2.1.4)
builder (2.1.2)
bundler (1.0.14)
devise (1.3.4)
erubis (2.6.6)
haml (3.1.1)
i18n (0.5.0)
kgio (2.4.1)
mail (2.2.19)
mime-types (1.16)
orm_adapter (0.0.5)
pg (0.11.0)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack-test …
Run Code Online (Sandbox Code Playgroud)

haml actionview ruby-on-rails-3

6
推荐指数
2
解决办法
5130
查看次数

ActionView :: MissingTemplate:缺少模板主页/索引 - Google Crawler

我在网站上启动Google Crawler时遇到此错误:

错误信息:

ActionView :: MissingTemplate:缺少模板home/index,带有{:locale => [:fr],:formats => ["image/*"]的应用程序/索引,:handlers => [:erb,:builder,:haml ]}.搜索:*"/ home/custodir/apps/default/releases/32/app/views"*"/ home /custodir /apps/default/shared/bundle/ruby​​/2.0.0/gems/fixitor-4.0.10/app/views"*"/ home/custodir /apps/default/shared/bundle/ruby​​/2.0.0/gems/rails_admin-0.4.9/app/views"*"/ home/custodir/apps/default/shared /bundle/ruby/2.0.0/gems/kaminari-0.15.1/app/views"*"/ home/custodir /apps/default/shared/bundle/ruby​​/2.0.0/gems/devise-2.1.4 /应用程序/视图"

研究SO:

我注意到这3个相关问题: ActionView :: MissingTemplate - >我没有使用HAML

ActionView :: MissingTemplate:缺少模板 - >不相关

Googlebot收到现有模板的模板错误 - >尝试了gem"rails_fix_google_bot_accept"没有区别.

更多细节:

Errbit说可能的错误: 88.4%

ActionView :: MissingTemplate:缺少模板home/index,带有{:locale => [:fr],:formats => ["image/*"]的应用程序/索引,:handlers => [:erb,:builder,:haml ]}.搜索:*"/ home/custodir/apps/default/releases/30/app/views"*"/ home/custodir /apps/default/shared/bundle/ruby​​/2.0.0/gems/fixitor-4.0.10/app/views"*"/ home/custodir /apps/default/shared/bundle/ruby​​/2.0.0/gems/rails_admin-0.4.9/app/views"*"/ home/custodir/apps/default/shared /bundle/ruby/2.0.0/gems/kaminari-0.15.1/app/views"*"/ home/custodir /apps/default/shared/bundle/ruby​​/2.0.0/gems/devise-2.1.4 /应用程序/视图"

7.4%

ActionView :: MissingTemplate:缺少模板home/index,application/index with {:locale => [:fr],:formats => [:css],:handlers => [:erb,:builder,:haml]}.搜索:*"/ home/custodir/apps/default/releases/30/app/views"*"/ home/custodir /apps/default/shared/bundle/ruby​​/2.0.0/gems/fixitor-4.0.10/app/views"*"/ home/custodir /apps/default/shared/bundle/ruby​​/2.0.0/gems/rails_admin-0.4.9/app/views"*"/ home/custodir/apps/default/shared …

ruby ruby-on-rails web-crawler google-crawlers

5
推荐指数
1
解决办法
3215
查看次数