public
Created

ruby debug

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
mongo-problem.rb:42
video_group.update!({ 'videos.video_id' => 'video1', :multi => true }, '$set' => {
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:265
update(opts.merge(:safe => true),update_doc)
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:243
if opts[:raise] == true
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:248
return false if new? || removed? || !valid?
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:132
self.is_new == true
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:184
self.removed == true
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:119
check_typed_fields!
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/typed_fields.rb:40
self.class.typed_fields.each do |name, opts|
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/typed_fields.rb:33
@typed_fields || {}
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:120
self.errors = Mongomatic::Errors.new
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/errors.rb:4
@errors = HashWithIndifferentAccess.new
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/hash_with_indifferent_access.rb:24
if constructor.is_a?(Hash)
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/hash_with_indifferent_access.rb:25
super()
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/hash_with_indifferent_access.rb:26
update(constructor)
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/hash_with_indifferent_access.rb:71
if other_hash.is_a? HashWithIndifferentAccess
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/hash_with_indifferent_access.rb:74
other_hash.each_pair { |key, value| regular_writer(convert_key(key), convert_value(value)) }
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/hash_with_indifferent_access.rb:75
self
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:121
do_callback(:before_validate)
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:316
notify(meth) if self.class.included_modules.include?(Mongomatic::Observable) # TODO entire block is smelly, doesnt belong here
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:318
return false unless respond_to?(meth, true)
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:122
validate
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:115
true
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:123
do_callback(:after_validate)
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:316
notify(meth) if self.class.included_modules.include?(Mongomatic::Observable) # TODO entire block is smelly, doesnt belong here
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:318
return false unless respond_to?(meth, true)
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:124
self.errors.empty?
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/errors.rb:32
!(@errors.any? { |k,v| v && !v.empty? })
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:250
do_callback(:before_update)
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:316
notify(meth) if self.class.included_modules.include?(Mongomatic::Observable) # TODO entire block is smelly, doesnt belong here
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:318
return false unless respond_to?(meth, true)
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:251
do_callback(:before_insert_or_update)
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:316
notify(meth) if self.class.included_modules.include?(Mongomatic::Observable) # TODO entire block is smelly, doesnt belong here
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:318
return false unless respond_to?(meth, true)
(rdb:1) s
/home/steve/.rvm/gems/ruby-1.9.3-p194/gems/mongomatic-0.8.2/lib/mongomatic/base.rb:252
ret = self.class.collection.update({"_id" => @doc["_id"]}, update_doc, opts)
(rdb:1) p opts
{"videos.video_id"=>"video1", :multi=>true, :safe=>true}
(rdb:1) p self.class.collection.update({"_id" => @doc["_id"], "videos.video_id"=>"video1"}, update_doc, opts)
{"updatedExisting"=>true, "n"=>1, "connectionId"=>21, "err"=>nil, "ok"=>1.0}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.