What's wrong with my index.rhtml?

L

lists

Hi,
When I use some eruby examples from the PickAxe book as my
index.rhtml file, the page loads. When my index.rhtml file contains
the following, I get a server error 500:


<% Dir.glob("*") do |i| %>
<% if test(?d, i) %>
<tr>
<td><%= i %></td>
<td align="right"><a href="<%= i %>/index.html"><%= i %></
a></td>
</tr>
<% end %>
<% end %>

I think the problem lies with test(). I noticed the same thing
happens with File.stat() and File.directory?(). Any ideas as to
what's failing or suggestions?

Thanks,
Ryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top