我试图消除狂欢的幻想。当我试图加载该网站时,我收到了这个错误。
Spree :: Home #index中的ActionView :: MissingTemplate 显示/var/www/mystore/app/views/spree/home/index.html.erb第2行引发:
缺少部分狂欢/主页/滑块,狂欢/存储/滑块,狂欢/基础/滑块,带{:locale => [:en],:formats => [:html]的应用程序/滑块,:处理程序=> [:erb,:builder,:raw,:ruby,:jbuilder,:coffee,:rabl] ,: versions => [:v1]}。搜索范围: *“/ var / www / mystore / app / views” *“/home/spree/.rvm/gems/ruby-2.0.0-p481/bundler/gems/spree_auth_devise-81a0fbb2db15/lib/views/backend” *“/home/spree/.rvm/gems/ruby-2.0.0-p481/bundler/gems/spree_auth_devise-81a0fbb2db15/lib/views/frontend” *“/home/spree/.rvm/gems/ruby-2.0.0-p481/gems/devise-3.2.4/app/views” *“/home/spree/.rvm/gems/ruby-2.0.0-p481/bundler/gems/spree_gateway-ea9dd0468485/app/views” *“/home/spree/.rvm/gems/ruby-2.0.0-p481/gems/spree_frontend-2.2.2/app/views” *“/home/spree/.rvm/gems/ruby-2.0.0-p481/gems/spree_backend-2.2.2/app/views” *“/home/spree/.rvm/gems/ruby-2.0.0-p481/gems/spree_api-2.2.2/app/views” *“/home/spree/.rvm/gems/ruby-2.0.0-p481/gems/spree_core-2.2.2/app/views” *“/home/spree/.rvm/gems/ruby-2.0.0-p481/gems/kaminari-0.15.1/app/views”
Extracted source (around line #2):
1 <% content_for :subheader do %>
2 <%= render 'slider' %>
3 <% end %>
但是localhost:3000 /产品工作得非常好。只有索引页面不起作用。
答案 0 :(得分:1)
spree_fancy会覆盖home / index视图。似乎你没有替换那个默认值。 检查https://github.com/spree/spree_fancy/blob/master/app/views/spree/home/index.html.erb是否有报告行
<% content_for :subheader do %>
<%= render 'slider' %>
<% end %>
但https://github.com/spree/spree/blob/master/frontend/app/views/spree/home/index.html.erb不