Ezra Wolfe on 3 Jun 2008 12:28:49 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PhillyOnRails] Moving to a windows server continued, another error, need some help, thanks


Title: Moving to a windows server continued, another error, need some help, thanks

Hi all,

In our continuing saga of deploying a RoR app on a Windows 2003 server, I've got a new error I need help trying to troubleshoot (see below).

We've got the same codebase deployed directly form svn, and the same db structure. Seems like everything is working fine except for this particular view. 

Can anyone give me a clue on how to troubleshoot this? I've Googled it and most suggestions point to the code or database, which I think we've pretty much ruled out.

---------------------------------------------
A ActionView::TemplateError occurred in calendar_admin#add_event:

  You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.empty?
  On line #11 of app/views/nodes/_attribute.rhtml

    8: </label>
    9: <% error = error_message_on(:attr, :akey) %>
    10: <%= "<div class=/"fieldWithErrors/">" unless error.nil? %>
    11: <%= @attr.render_control
    12: %>
    13: <%= "</div>" unless error.nil? %>
    14:

    #{RAILS_ROOT}/app/models/attribute.rb:403:in `render_date'
    #{RAILS_ROOT}/app/models/attribute.rb:381:in `send'
    #{RAILS_ROOT}/app/models/attribute.rb:381:in `render_control'
    #{RAILS_ROOT}/app/views/nodes/_attribute.rhtml:11:in `_run_rhtml_nodes__attribute'

----------------------------------------------------------------------------
Here is the code from attribute.rb. Line 403 is the second line below.

 def render_date
    if self.value.empty?
      date = Date.today
    else
      pdate = ParseDate.parsedate(self.value)
      date = Date.new(pdate[0],pdate[1],pdate[2])
    end
    #helpful.select_date date, {:prefix => control_tag_id}
    helpful.date_box(control_tag_id, control_tag_css_id, date.to_time.strftime("%m/%d/%Y"))
  end


-----------------------------------------------------------------------------
Regards,
Ezra Wolfe
DLC Solutions
3701 Market Street, Suite 462
Philadelphia, Pa 19104
Mobile: 215.868.5336
Office: 215.966.6177
Fax: 703.935.5594
AIM: ezrawolfe
Skype: ezra.wolfe
www.dlc-solutions.com


_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk