Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActionView::MissingTemplate with Haml

#2005

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

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

State: resolved
Milestone: none
Assigned to: josh josh
Importance: none

Activity

  1. thedarkone
    thedarkone

    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.

    February 18th, 2009 @ 04:07 PM

  2. nachocab (at gmail)
    nachocab (at gmail)

    Do you get the error using Haml 1.8 and this test file? http://gist.github.com/66439

    February 18th, 2009 @ 05:50 PM

  3. thedarkone
    thedarkone

    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: http://github.com/thedarkone/ham...

    The app uses edge Rails and edge Haml.

    
    git clone git://github.com/thedarkone/haml-fail.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
    Started
    .
    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.

    February 18th, 2009 @ 06:45 PM

  4. josh
    josh
    • Milestone cleared.

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

    February 18th, 2009 @ 08:51 PM

  5. nachocab (at gmail)
    nachocab (at gmail)

    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?

    February 19th, 2009 @ 05:41 AM

  6. Andrew White
    Andrew White

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

    February 19th, 2009 @ 06:24 AM

  7. nachocab (at gmail)
    nachocab (at gmail)

    These are my locally installed gems: http://gist.github.com/66785 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

    February 19th, 2009 @ 07:52 AM

  8. Andrew White
    Andrew White

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

    February 19th, 2009 @ 09:02 AM

  9. thedarkone
    thedarkone

    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 :).

    February 19th, 2009 @ 07:52 PM

  10. josh
    josh
    • 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.

    February 20th, 2009 @ 03:23 AM

  11. nachocab (at gmail)
    nachocab (at gmail)

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

    February 20th, 2009 @ 08:35 PM