What's wrong with my index.rhtml?

Discussion in 'Ruby' started by lists, Aug 27, 2005.

  1. lists

    lists Guest

    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
    lists, Aug 27, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Francis Hwang
    Replies:
    2
    Views:
    116
    Francis Hwang
    Oct 7, 2004
  2. Joao Pedrosa
    Replies:
    8
    Views:
    254
    Joao Pedrosa
    Oct 12, 2004
  3. Martin Nemzow
    Replies:
    0
    Views:
    98
    Martin Nemzow
    Jun 8, 2006
  4. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    266
    Tomasz Chmielewski
    Mar 4, 2008
  5. Stefan Mueller
    Replies:
    7
    Views:
    175
    Thomas 'PointedEars' Lahn
    Nov 28, 2005
Loading...

Share This Page