Note that there are some explanatory texts on larger screens.

plurals
  1. PORails 2.3.2 trying to render ERB instead of HAML
    primarykey
    data
    text
    <p>Rails is suddenly trying to render ERB instead of Haml and I can't figure out why. I've created new rails projects, reinstalled Haml, and reinstalled Rails.</p> <p>Here's exactly the steps I take when making my application (Rails 2.3.2):</p> <pre><code> rails&gt; rails test rails&gt; cd test rails\test&gt; haml --rails . rails\test&gt; ruby script\generate model user email:string password:string rails\test&gt; ruby script\generate controller users index rails\test&gt; rake db:migrate </code></pre> <p>Here's what the UsersController looks like:</p> <pre><code>class UsersController &lt; ApplicationController def index @users = User.all end end </code></pre> <p>My routes:</p> <pre><code>ActionController::Routing::Routes.draw do |map| map.resources :users end </code></pre> <p>I now create <em>views\users\index.html.haml</em>:</p> <pre><code>%table %th(style="text-align: left;") %h1 Users - for user in @users %tr %td= user.email %td= user.password </code></pre> <p>Annnd run the server... I navigate to <em>localhost:3000\users</em> and I get this error message:</p> <pre><code>Template is missing Missing template users/index.erb in view path app/views </code></pre> <p>For some reason Rails is trying to find and render .erb files instead of .haml files. <em>vendor\plugins\haml\init.rb</em> exists, untouched. </p> <p>I've reinstalled Haml (Pretty Penny) multiple times and still get the same results. I've also tried adding config.gem 'haml' to my environment.rb but this also doesn't work.</p> <p>I can't figure out why suddenly rails will not render haml for me.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

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