Note that there are some explanatory texts on larger screens.

plurals
  1. PORails Rendering: Intermittent Resource not found (ActionView::TemplateError)
    text
    copied!<p>I could use some help figuring out what's going on. Check the log output below -- why would rails treat the two renders differently? Why does one succeed, without any related SQL calls and the second fail -- with an SQL access. (It's not an ActiveRecord model, no SQL should be involved in this render.)</p> <h2>Background</h2> <p>I have a cucumber feature with two scenarios that each rely on Webrat to resolve the step 'When I go to the list of articles' The Article model is not an ActiveRecord model, and shouldn't rely on SQL for access. </p> <p>If I order the scenarios #1, #2 in the file, the first scenario passes all tests, while the second scenario fails, as expected, at a later different step.</p> <p>If I order the scenarios #2, #1 in the file, the #2 scenario fails as expected, after passing the step in question. But the #1 scenario now fails the 'When I go to the list of articles' step with:</p> <p>Resource not found (ActionView::TemplateError) features/article.feature:23:in `When I go to the list of articles'</p> <h2>test.log contents</h2> <p>-------- webrat test is successful - non-db backed model --------------</p> <pre><code>Processing ArticlesController#index (for 127.0.0.1 at 2009-08-12 13:22:37) [GET] Parameters: {"action"=&gt;"index", "controller"=&gt;"articles"} Rendering template within layouts/application Rendering articles/index Completed in 9ms (View: 6, DB: 0) | 200 OK [http://www.example.com/ccc/articles] REQUESTING PAGE: GET /ccc/articles/new with {} and HTTP headers {"HTTP_REFERER"=&gt;"/ccc/articles"} </code></pre> <p>-------- webrat test fails ---------------------</p> <pre><code>Processing ArticlesController#index (for 127.0.0.1 at 2009-08-12 13:22:37) [GET] Parameters: {"action"=&gt;"index", "controller"=&gt;"articles"} Rendering template within layouts/application Rendering articles/index Processing ApplicationController#index (for 127.0.0.1 at 2009-08-12 13:22:37) [GET] Parameters: {"action"=&gt;"index", "controller"=&gt;"articles"} ^[[4;35;1mSQL (0.1ms)^[[0m ^[[0mROLLBACK^[[0m </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload