I am trying to test insert a row into sqlite3 db, for the Rails Tutorial in Chapter 7. I have gone over the code many times and it looks correct, however in the console I am getting the following error. Any suggestions?
User.create(name=>”test user”,:email=>”testuser@example.com”,:password=>”foobar”,:password_confirmation=>”foobar”)
ArgumentError: wrong number of arguments (0 for 1)
from /Library/Ruby/Gems/1.8/gems/activerecord-3.0.3/lib/active_record/base.rb:442:inmaximum'send‘
from /Library/Ruby/Gems/1.8/gems/activerecord-3.0.3/lib/active_record/base.rb:442:in
from /Library/Ruby/Gems/1.8/gems/activerecord-3.0.3/lib/active_record/base.rb:442:inmaximum'load’
from /Users/gabemcmillan/rails_projects/sample_app/app/models/user.rb:10
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:454:in
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:454:inload_file'new_constants_in’
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:453:inload_file'require_or_load’
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:340:in
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:491:inload_missing_constant'const_missing’
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:183:in
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:181:ineach'const_missing’
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:181:in
from (irb):8
It should be
User.create(:name...(with a colon beforename), notUser.create(name...