Any time I try to use any methods of the Date class, I get errors of ''invalid date''. For example, I have this happening: With the code Date.today, I get this error from Rails: - - - - - - - - - - ArgumentError in Student#show Showing app/views/student/show.rhtml where line #10 raised: invalid date Extracted source (around line #10): 7: <p> <%= @student.full_contact_info %></p> 8: <p> Birthday: 9: <%= # BUG - This doesn''t work for some reason 10: Date.today 11: %><br /> 12: Gender: <%= @student.full_gender %><br /> 13: School Year: <%= @student.school_year %> RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace /usr/lib/ruby/1.8/date.rb:591:in `new0'' /usr/lib/ruby/1.8/Date.rb:703:in `today'' #{RAILS_ROOT}/app/views/student/show.rhtml:10:in `_run_rhtml_student_show'' /usr/lib/ruby/1.8/date.rb:591:in `new0'' /usr/lib/ruby/1.8/Date.rb:703:in `today'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_view/base.rb: 314:in `send'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_view/base.rb: 314:in `compile_and_render_template'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_view/base.rb: 290:in `render_template'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_view/base.rb: 249:in `render_file'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ base.rb:699:in `render_file'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ base.rb:621:in `render_with_no_layout'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ layout.rb:243:in `render_without_benchmark'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ benchmarking.rb:53:in `render'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ benchmarking.rb:53:in `measure'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ benchmarking.rb:53:in `render'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ base.rb:911:in `perform_action_without_filters'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ filters.rb:368:in `perform_action_without_benchmark'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ benchmarking.rb:69:in `perform_action_without_rescue'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ benchmarking.rb:69:in `measure'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ benchmarking.rb:69:in `perform_action_without_rescue'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ rescue.rb:82:in `perform_action'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ base.rb:381:in `send'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ base.rb:381:in `process_without_filters'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ filters.rb:377:in `process_without_session_management_support'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ session_management.rb:117:in `process'' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in `dispatch'' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in `handle_dispatch'' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in `service'' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' /usr/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' /usr/lib/ruby/1.8/webrick/server.rb:144:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' /usr/lib/ruby/1.8/webrick/server.rb:94:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:89:in `each'' /usr/lib/ruby/1.8/webrick/server.rb:89:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in `dispatch'' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/ webrick.rb:59 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ dependencies.rb:147:in `require'' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ dependencies.rb:147:in `require'' script/server:3 /usr/lib/ruby/1.8/date.rb:591:in `new0'' /usr/lib/ruby/1.8/Date.rb:703:in `today'' #{RAILS_ROOT}/app/views/student/show.rhtml:10:in `_run_rhtml_student_show'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_view/base.rb: 314:in `send'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_view/base.rb: 314:in `compile_and_render_template'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_view/base.rb: 290:in `render_template'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_view/base.rb: 249:in `render_file'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ base.rb:699:in `render_file'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ base.rb:621:in `render_with_no_layout'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ layout.rb:243:in `render_without_benchmark'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ benchmarking.rb:53:in `render'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ benchmarking.rb:53:in `measure'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ benchmarking.rb:53:in `render'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ base.rb:911:in `perform_action_without_filters'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ filters.rb:368:in `perform_action_without_benchmark'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ benchmarking.rb:69:in `perform_action_without_rescue'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ benchmarking.rb:69:in `measure'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ benchmarking.rb:69:in `perform_action_without_rescue'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ rescue.rb:82:in `perform_action'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ base.rb:381:in `send'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ base.rb:381:in `process_without_filters'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ filters.rb:377:in `process_without_session_management_support'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/ session_management.rb:117:in `process'' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in `dispatch'' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:115:in `handle_dispatch'' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in `service'' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' /usr/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' /usr/lib/ruby/1.8/webrick/server.rb:144:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' /usr/lib/ruby/1.8/webrick/server.rb:94:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:89:in `each'' /usr/lib/ruby/1.8/webrick/server.rb:89:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:67:in `dispatch'' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/ webrick.rb:59 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ dependencies.rb:147:in `require'' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ dependencies.rb:147:in `require'' script/server:3 Request Parameters: {"id"=>"6"} Show session dump --- flash: !ruby/hash:ActionController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} - - - - - - - - - - Oh, also, if I run ''ruby script/console'' and load up the app''s environment, I don''t get that error. It returns today''s date as expected. Any ideas? Thanks so much for your help. This one is driving me insane. -geoffrey Geoffrey Lessel @ HydroMint Media geoffrey@hydromint.com // Skype: HydroMint Thompsons Station, Tennessee -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060623/4aa455a3/attachment-0001.html