Rails not rendering Haml templates

479 views
Skip to first unread message

Ryan

unread,
Jan 2, 2010, 2:20:12 AM1/2/10
to Haml
Hello, just trying to use Haml for the first time. I installed the
plugin and can see it in /vendor/plugins/haml. I removed an
index.html.erb review and created a index.html.haml view, but the
browser is giving me this:

Template is missing
Missing template endorsements/index.erb in view path app/views

Any help? Thanks.

Nathan Weizenbaum

unread,
Jan 2, 2010, 2:29:24 AM1/2/10
to haml
Are you sure you've restarted the server? Do you see any errors when you start it up?


--

You received this message because you are subscribed to the Google Groups "Haml" group.
To post to this group, send email to ha...@googlegroups.com.
To unsubscribe from this group, send email to haml+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.



Ryan

unread,
Jan 2, 2010, 2:48:43 AM1/2/10
to Haml
I didn't restart the server. I'm brand new to Rails. Thanks!

On Jan 1, 11:29 pm, Nathan Weizenbaum <nex...@gmail.com> wrote:
> Are you sure you've restarted the server? Do you see any errors when you
> start it up?
>
>
>
> On Fri, Jan 1, 2010 at 11:20 PM, Ryan <ryan.mckil...@gmail.com> wrote:
> > Hello, just trying to use Haml for the first time. I installed the
> > plugin and can see it in /vendor/plugins/haml. I removed an
> > index.html.erb review and created a index.html.haml view, but the
> > browser is giving me this:
>
> > Template is missing
> > Missing template endorsements/index.erb in view path app/views
>
> > Any help? Thanks.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Haml" group.
> > To post to this group, send email to ha...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > haml+uns...@googlegroups.com <haml%2Bunsu...@googlegroups.com>.

Bradley Grzesiak

unread,
Jan 2, 2010, 9:40:14 AM1/2/10
to ha...@googlegroups.com
Hey Ryan!

Welcome to rails! To prevent your frustration in the future, here's a simple rule to follow:

If you change anything in a rails application that isn't in app/, restart the server.

Notice I didn't say "you must restart the server" because there are some things outside of app/ that don't require a restart. But for beginners like you, it's sufficient and restarting a server takes only a few seconds. After working with rails for a while, you'll learn what needs a restart and what doesn't.

:brad

PS: this advice does not pertain if you're modifying a production environment (which you shouldn't do in the first place without a deployment mechanism).

To unsubscribe from this group, send email to haml+uns...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/haml?hl=en.





--
Bradley Grzesiak
list...@gmail.com

* You have received an email from my personal account. Please do not divulge this address to any website (eg: evite, shutterfly, etc). I have another address for such uses; please ask me for it.

Ryan McKillen

unread,
Jan 2, 2010, 2:56:04 PM1/2/10
to ha...@googlegroups.com
Good rule of thumb. Thanks!

Iļja Ketris

unread,
Jan 8, 2010, 9:09:26 AM1/8/10
to Haml

I am having the same issue.

Installed HAML:

haml (2.2.16, 2.2.15, 2.2.9, 2.2.3)
haml-edge (2.3.100, 2.3.99, 2.3.60, 2.3.27)

Renamed a template:

ike@shirma:~/Z/shakodat$ ls -l app/views/authors/
total 16
-rwxrwxrw- 1 ike ike 517 2009-07-25 15:00 edit.html.erb
-rwxr-xr-- 1 ike ike 870 2010-01-08 15:51 index.html.haml
-rwxrwxrw- 1 ike ike 411 2009-07-25 12:51 new.html.erb
-rwxrwxrw- 1 ike ike 250 2009-07-25 12:54 show.html.erb
ike@shirma:~/Z/shakodat$

And got

ActionView::MissingTemplate (Missing template authors/index.erb in
view path app/views):
app/controllers/authors_controller.rb:12:in `index'

Rendering rescues/layout (internal_server_error)

Nathan Weizenbaum

unread,
Jan 8, 2010, 4:20:04 PM1/8/10
to ha...@googlegroups.com
Have you installed Haml to your project? You should have something in vendor/plugins/haml. Are you sure you restarted the server?

Reply all
Reply to author
Forward
0 new messages