You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a view spec that runs fine in Rails 6, but after upgrading to Rails 7, it reports an ActionView::MissingTemplateException
Failures:
1) catalog/facet.html.erb has the facet title
Failure/Error: render
ActionView::MissingTemplate:
Missing template catalog/facet with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>["erb"]}.
Searched in:
* "catalog/_facet_pagination.html.erb"
* "/Users/jcoyne85/workspace/projectblacklight/blacklight/.internal_test_app/app/views"
* "/Users/jcoyne85/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/bundler/gems/devise-8593801130f2/app/views"
* "/Users/jcoyne85/workspace/projectblacklight/blacklight/app/views"
* "/Users/jcoyne85/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/view_component-2.46.0/app/views"
* "/Users/jcoyne85/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/kaminari-core-1.2.1/app/views"
* "/Users/jcoyne85/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actiontext-7.0.0.rc1/app/views"
* "/Users/jcoyne85/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionmailbox-7.0.0.rc1/app/views"
# ./spec/views/catalog/facet.html.erb_spec.rb:21:in `block (2 levels) in <top (required)>'
Top 1 slowest examples (0.20789 seconds, 99.4% of total time):
catalog/facet.html.erb has the facet title
0.20789 seconds ./spec/views/catalog/facet.html.erb_spec.rb:20
Finished in 0.20907 seconds (files took 5.61 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./spec/views/catalog/facet.html.erb_spec.rb:20 # catalog/facet.html.erb has the facet title
However the file exists in the search path:
$ ls /Users/jcoyne85/workspace/projectblacklight/blacklight/app/views/catalog/facet.html.erb
/Users/jcoyne85/workspace/projectblacklight/blacklight/app/views/catalog/facet.html.erb
This can be minimally reduced to:
# spec/views/catalog/facet.html.erb_spec.rb
RSpec.describe 'catalog/facet.html.erb' do
it "has the facet title" do
render
end
end
The text was updated successfully, but these errors were encountered:
Hi @jcoyne & @pirj , I discovered this (and the linked #2521 PR) after I ran into the same issue as Justin upgrading to rails 7. Is there a fix or workaround for this?
I have a view spec that runs fine in Rails 6, but after upgrading to Rails 7, it reports an ActionView::MissingTemplateException
However the file exists in the search path:
This can be minimally reduced to:
The text was updated successfully, but these errors were encountered: