I have started to get the error message “wrong number of arguments (1
for 0)” since I upgraded to Gusty Gibbon.
I am new to ROR so I have no clue.
This is the code that was running
def create
@user = User.new(params[:user])
if @user.save
flash[:notice] = ‘User was successfully created.’
redirect_to :action => ‘list’
else
render :action => ‘new’
end
end
andf this is the stack trace any help would be appreciated
ArgumentError in Access/userController#create
wrong number of arguments (1 for 0)
RAILS_ROOT: script/…/config/…
Application Trace | Framework Trace | Full Trace
app/models/user.rb:17:in initialize' app/models/user.rb:17:in
new’
app/models/user.rb:17:in hashed' app/models/user.rb:35:in
update_password’
/var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
callbacks.rb:333:in send' /var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ callbacks.rb:333:in
callback’
/var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
callbacks.rb:330:in each' /var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ callbacks.rb:330:in
callback’
/var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
callbacks.rb:241:in create_or_update' /var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/base.rb: 1533:in
save_without_validation’
/var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
validations.rb:752:in save_without_transactions' /var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ transactions.rb:129:in
save’
/var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
connection_adapters/abstract/database_statements.rb:59:in
transaction' /var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ transactions.rb:95:in
transaction’
/var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
transactions.rb:121:in transaction' /var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ transactions.rb:129:in
save’
app/controllers/access/user_controller.rb:29:in create' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/base.rb: 1095:in
send’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/base.rb:
1095:in perform_action_without_filters' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:632:in
call_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:638:in call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:438:in
call’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:637:in call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:638:in
call_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:438:in call' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:637:in
call_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:619:in perform_action_without_benchmark' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ benchmarking.rb:66:in
perform_action_without_rescue’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
benchmarking.rb:66:in perform_action_without_rescue' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ rescue.rb:83:in
perform_action’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/base.rb:
430:in send' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/base.rb: 430:in
process_without_filters’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:624:in process_without_session_management_support' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ session_management.rb:114:in
process’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/base.rb:
330:in process' /var/lib/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:79:in
service’
/var/lib/gems/1.8/gems/rails-1.2.1/lib/commands/servers/webrick.rb:59
/var/lib/gems/1.8/gems/activesupport-1.4.0/lib/active_support/
dependencies.rb:496:in require' /var/lib/gems/1.8/gems/activesupport-1.4.0/lib/active_support/ dependencies.rb:343:in
new_constants_in’
/var/lib/gems/1.8/gems/activesupport-1.4.0/lib/active_support/
dependencies.rb:496:in require' /var/lib/gems/1.8/gems/rails-1.2.1/lib/commands/server.rb:39 -e:4:in
load’
-e:4
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /var/lib/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:41:in
dispatch’
/var/lib/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:113:in
handle_dispatch' /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:173:in
start_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/lib/ruby/1.8/webrick/server.rb:162:in
start_thread’
/usr/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/lib/ruby/1.8/webrick/server.rb:92:in
each’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:in
start’
/usr/lib/ruby/1.8/webrick/server.rb:82:in start' /var/lib/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:63:in
dispatch’
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
require’
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
require’
script/server:5
app/models/user.rb:17:in initialize' app/models/user.rb:17:in
new’
app/models/user.rb:17:in hashed' app/models/user.rb:35:in
update_password’
/var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
callbacks.rb:333:in send' /var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ callbacks.rb:333:in
callback’
/var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
callbacks.rb:330:in each' /var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ callbacks.rb:330:in
callback’
/var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
callbacks.rb:241:in create_or_update' /var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/base.rb: 1533:in
save_without_validation’
/var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
validations.rb:752:in save_without_transactions' /var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ transactions.rb:129:in
save’
/var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
connection_adapters/abstract/database_statements.rb:59:in
transaction' /var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ transactions.rb:95:in
transaction’
/var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/
transactions.rb:121:in transaction' /var/lib/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ transactions.rb:129:in
save’
app/controllers/access/user_controller.rb:29:in create' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/base.rb: 1095:in
send’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/base.rb:
1095:in perform_action_without_filters' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:632:in
call_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:638:in call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:438:in
call’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:637:in call_filter' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:638:in
call_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:438:in call' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:637:in
call_filter’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
filters.rb:619:in perform_action_without_benchmark' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ benchmarking.rb:66:in
perform_action_without_rescue’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ benchmarking.rb:66:in
perform_action_without_rescue’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
rescue.rb:83:in perform_action' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/base.rb: 430:in
send’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/base.rb:
430:in process_without_filters' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/ filters.rb:624:in
process_without_session_management_support’
/var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/
session_management.rb:114:in process' /var/lib/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/base.rb: 330:in
process’
/var/lib/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:41:in dispatch' /var/lib/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:113:in
handle_dispatch’
/var/lib/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:79: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:173:in
start_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/lib/ruby/1.8/webrick/server.rb:162:in
start_thread’
/usr/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/lib/ruby/1.8/webrick/server.rb:92:in
each’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:in
start’
/usr/lib/ruby/1.8/webrick/server.rb:82:in start' /var/lib/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:63:in
dispatch’
/var/lib/gems/1.8/gems/rails-1.2.1/lib/commands/servers/webrick.rb:59
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
require’
/var/lib/gems/1.8/gems/activesupport-1.4.0/lib/active_support/
dependencies.rb:496:in require' /var/lib/gems/1.8/gems/activesupport-1.4.0/lib/active_support/ dependencies.rb:343:in
new_constants_in’
/var/lib/gems/1.8/gems/activesupport-1.4.0/lib/active_support/
dependencies.rb:496:in require' /var/lib/gems/1.8/gems/rails-1.2.1/lib/commands/server.rb:39 /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require’
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in require' script/server:5 -e:4:in
load’
-e:4
Request
Parameters: {“user”=>{“lastName”=>“Bragg”,
“username”=>“percivalbragg”, “firstName”=>“Percival”,
“phone”=>“315-457-3000”, “fax”=>"", “password”=>“kin2ja”,
“active”=>“t”, “email”=>“[email protected]”},
“commit”=>“Create”}
Show session dump
flash: !map:ActionController::Flash::FlashHash {}
Response
Headers: {“cookie”=>[], “Cache-Control”=>“no-cache”}