thinkwell/mongoid_nested_set — Issue #3: Category.create NoMethodError: undefined method `nan?' for 2:Fixnum 
Author: proton
Created: 2011-10-29 14:06:35+00:00
State: open

ruby-1.9.2-p290 :022 > Category.create
=> #
ruby-1.9.2-p290 :023 > Category.create
NoMethodError: undefined method `nan?' for 2:Fixnum
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/contexts/mongo.rb:374:in `grouped'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/contexts/mongo.rb:250:in `max'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/criteria.rb:43:in `max'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid_nested_set-0.1.3/lib/mongoid_nested_set/update.rb:68:in `set_default_left_and_right'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:395:in `_run_create_callbacks'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/persistence/insertion.rb:25:in `block (2 levels) in prepare'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:399:in `_run_save_callbacks'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/persistence/insertion.rb:24:in `block in prepare'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/persistence/insertion.rb:22:in `tap'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/persistence/insertion.rb:22:in `prepare'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/persistence/operations/insert.rb:26:in `persist'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/persistence.rb:44:in `insert'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/persistence.rb:149:in `upsert'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/persistence.rb:170:in `block (2 levels) in create'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/persistence.rb:170:in `tap'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/persistence.rb:170:in `block in create'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/persistence.rb:273:in `creating'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/mongoid-2.2.3/lib/mongoid/persistence.rb:169:in `create'
from (irb):23
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/commands/console.rb:45:in `start'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/commands/console.rb:8:in `start'
from /home/proton/projects/webra/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/commands.rb:40:in `'
from script/rails:7:in `require'
from script/rails:7:in `

'ruby-1.9.2-p290 :024 >