This project is archived and is in readonly mode.

#2005 ✓resolved
nachocab (at gmail)

ActionView::MissingTemplate with Haml

Reported by nachocab (at gmail) | February 18th, 2009 @ 09:49 AM

Commit 3942cb406e1d5db0ac00e03153809cc8dc4cc4db generates this error when doing a simple: get 'new' in ActionController::TestCase. This was previously reported in ticket #1909 and fixed in commit 893e9eb99504705419ad6edac14d00e71cef5f12. The error seems to be in action_view/paths.rb

Comments and changes to this ticket

  • thedarkone

    thedarkone February 18th, 2009 @ 04:07 PM

    Could you please provide a minimalistic example (perhaps upload a small 1 controller app, that would demonstrate the isssue)? I can't reproduce the error.

  • nachocab (at gmail)

    nachocab (at gmail) February 18th, 2009 @ 05:50 PM

    Do you get the error using Haml 1.8 and this test file?

  • thedarkone

    thedarkone February 18th, 2009 @ 06:45 PM

    I can't get Haml 1.8 to work with edge Rails (the errors are completely unrelated to the issue at hand, my best guess is that 1.8 isn't Rails edge compatible at all) and since you seem to be unwilling to create the minimal app to demonstrate the problem, I've gone ahead made one for you:

    The app uses edge Rails and edge Haml.

    git clone git://
    cd haml-fail
    git submodule init
    git submodule update
    ruby -Itest ./test/functional/orders_controller_test.rb
    Loaded suite ./test/functional/orders_controller_test
    Finished in 0.198724 seconds.
    1 tests, 1 assertions, 0 failures, 0 errors

    I gave you commit rights to it on github, so give it a try.

  • josh

    josh February 18th, 2009 @ 08:51 PM

    • Milestone cleared.

    Hrm, no intentional template api were made from 2.2 => 2.3. Haml "should" work fine.

  • nachocab (at gmail)

    nachocab (at gmail) February 19th, 2009 @ 05:41 AM

    Hello thedarkone, sorry for not creating the app. Don't take it personally, I'm still learning the ropes. So, I've downloaded the project and I get the MissingTemplate error with edge rails and edge haml. What should I do now?

  • Andrew White

    Andrew White February 19th, 2009 @ 06:24 AM

    I've just downloaded the test app and it works fine for me. nachocab what gems do you have installed?

  • nachocab (at gmail)

    nachocab (at gmail) February 19th, 2009 @ 07:52 AM

    These are my locally installed gems: I'm on the latest version of rails and haml. If I checkout this rails commit b1d41bdfb06cb5f606f515965316a348d9bc9b47 (feb-12th) the error goes away, and if I checkout the next one 3942cb406e1d5db0ac00e03153809cc8dc4cc4db I get this error: ruby -Itest test/functional/orders_controller_test.rb Loaded suite test/functional/orders_controller_test 1) Error: test_/GET_index(OrdersControllerTest): ActionView::MissingTemplate: Missing template orders/index.erb in view path :/Users/Nacho/Documents/NetBeansProjects/haml-fail/app/views

    haml (2.1.0) rails/./lib/sass/plugin/rails.rb:19:in `process'
    test/functional/orders_controller_test.rb:5:in `test_/GET_index'

    1 tests, 0 assertions, 0 failures, 1 errors

  • Andrew White

    Andrew White February 19th, 2009 @ 09:02 AM

    Spotted the problem - you're running on Windows and this line is removing the drive letter.

  • thedarkone

    thedarkone February 19th, 2009 @ 07:52 PM

    nachocab, I don't have a windows box around right now, could you please test out the 0001-Fix-regressions-that-have-popped-up.patch patch that I have posted in #2012?

    Andrew, thank you yet again :).

  • josh

    josh February 20th, 2009 @ 03:23 AM

    • State changed from “new” to “resolved”

    I applied thedarkone's 0001-Fix-regressions-that-have-popped-up.patch patch. I suspect is resolves the issue. Please test it and let us know.

  • nachocab (at gmail)

    nachocab (at gmail) February 20th, 2009 @ 08:35 PM

    Confirmed, patch fixed it. Thanks thedarkone, I learned a lot looking at your code.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

Referenced by