I am currently using the book “Agile Web D. With
Rails” (2005). I am working on a fully function web application that
has a shopping cart.
The web page displays this,
ActiveRecord::StatementInvalid in AdminController#create
Mysql::Error: #23000Column ‘date_available’ cannot be null: INSERT
INTO products (image_url
, date_available
, price
, title
,
description
) VALUES(‘http://www.google.com/pic.jpg’, NULL, ‘9.99’,
‘asdf’, ‘asdf’)
RAILS_ROOT: ./script/…/config/…
Application Trace | Framework Trace | Full Trace
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
connection_adapters/abstract_adapter.rb:128:in log' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ connection_adapters/mysql_adapter.rb:243:in
execute’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
connection_adapters/mysql_adapter.rb:253:in insert' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ base.rb:1811:in
create_without_callbacks’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
callbacks.rb:254:in create_without_timestamps' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ timestamp.rb:39:in
create’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
base.rb:1789:in create_or_update_without_callbacks' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ callbacks.rb:242:in
create_or_update’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
base.rb:1545:in save_without_validation' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ validations.rb:752:in
save_without_transactions’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
transactions.rb:129:in save' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ connection_adapters/abstract/database_statements.rb:59:in
transaction’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
transactions.rb:95:in transaction' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ transactions.rb:121:in
transaction’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
transactions.rb:129:in save' #{RAILS_ROOT}/app/controllers/admin_controller.rb:25:in
create’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
connection_adapters/abstract_adapter.rb:128:in log' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ connection_adapters/mysql_adapter.rb:243:in
execute’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
connection_adapters/mysql_adapter.rb:253:in insert' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ base.rb:1811:in
create_without_callbacks’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
callbacks.rb:254:in create_without_timestamps' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ timestamp.rb:39:in
create’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
base.rb:1789:in create_or_update_without_callbacks' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ callbacks.rb:242:in
create_or_update’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
base.rb:1545:in save_without_validation' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ validations.rb:752:in
save_without_transactions’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
transactions.rb:129:in save' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ connection_adapters/abstract/database_statements.rb:59:in
transaction’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
transactions.rb:95:in transaction' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ transactions.rb:121:in
transaction’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
transactions.rb:129:in save' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:1095:in
send’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
base.rb:1095:in perform_action_without_filters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:632:in
call_filter’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
filters.rb:638:in call_filter' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:438:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
filters.rb:637:in call_filter' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:619:in
perform_action_without_benchmark’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
benchmarking.rb:66:in perform_action_without_rescue' c:/ruby/lib/ruby/1.8/benchmark.rb:293:in
measure’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
benchmarking.rb:66:in perform_action_without_rescue' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ rescue.rb:83:in
perform_action’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
base.rb:430:in send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:430:in
process_without_filters’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
filters.rb:624:in process_without_session_management_support' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ session_management.rb:114:in
process’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
base.rb:330:in process' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in
dispatch’
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:
113:in handle_dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in
service’
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in service' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in
run’
c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in start_thread' c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in
start’
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in start_thread' c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in
start’
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in each' c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in
start’
c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in
start’
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:in
dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/ webrick.rb:59 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require’
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in
require’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:342:in new_constants_in' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in
require’
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
script/server:3
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
connection_adapters/abstract_adapter.rb:128:in log' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ connection_adapters/mysql_adapter.rb:243:in
execute’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
connection_adapters/mysql_adapter.rb:253:in insert' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ base.rb:1811:in
create_without_callbacks’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
callbacks.rb:254:in create_without_timestamps' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ timestamp.rb:39:in
create’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
base.rb:1789:in create_or_update_without_callbacks' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ callbacks.rb:242:in
create_or_update’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
base.rb:1545:in save_without_validation' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ validations.rb:752:in
save_without_transactions’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
transactions.rb:129:in save' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ connection_adapters/abstract/database_statements.rb:59:in
transaction’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
transactions.rb:95:in transaction' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ transactions.rb:121:in
transaction’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
transactions.rb:129:in save' #{RAILS_ROOT}/app/controllers/admin_controller.rb:25:in
create’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
base.rb:1095:in send' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:1095:in
perform_action_without_filters’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
filters.rb:632:in call_filter' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:638:in
call_filter’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
filters.rb:438:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:637:in
call_filter’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
filters.rb:619:in perform_action_without_benchmark' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ benchmarking.rb:66:in
perform_action_without_rescue’
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in measure' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ benchmarking.rb:66:in
perform_action_without_rescue’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
rescue.rb:83:in perform_action' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:430:in
send’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
base.rb:430:in process_without_filters' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:624:in
process_without_session_management_support’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/
session_management.rb:114:in process' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:330:in
process’
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in
dispatch' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb: 113:in
handle_dispatch’
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in
service' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in
service’
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in run' c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in
start_thread’
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in
start_thread’
c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in
each’
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in
start’
c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in start' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:in
dispatch’
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/
webrick.rb:59
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:495:in require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:342:in
new_constants_in’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:495:in require' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require’
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
script/server:3
Request
Parameters: {“commit”=>“Create”, “product”=>{“image_url”=>“http://
www.google.com/pic.jpg”, “price”=>“9.99”, “title”=>“asdf”,
“description”=>“asdf”}}
Show session dump
flash: !map:ActionController::Flash::FlashHash {}
Response
Headers: {“cookie”=>[], “Cache-Control”=>“no-cache”}
Does anyone know what it is saying in english?