Skip to content

Instantly share code, notes, and snippets.

@anlek
Created August 22, 2011 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anlek/1163588 to your computer and use it in GitHub Desktop.
Save anlek/1163588 to your computer and use it in GitHub Desktop.
Issue I'm having with Pry and Mongoid when looking at relationships
u = User.first
u.articles
/Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/pp.rb:258:in `method': undefined method `inspect' for class `Mongoid::Relations::Referenced::Many' (NameError)
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/pp.rb:258:in `call'
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/pp.rb:258:in `pretty_print'
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/pp.rb:140:in `pp'
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/prettyprint.rb:201:in `group'
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/prettyprint.rb:227:in `nest'
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/prettyprint.rb:200:in `group'
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/prettyprint.rb:212:in `group_sub'
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/prettyprint.rb:199:in `group'
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/pp.rb:140:in `pp'
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/pp.rb:77:in `pp'
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/pp.rb:119:in `guard_inspect_key'
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/pp.rb:77:in `pp'
from /Users/andrew/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/pp.rb:51:in `pretty_inspect'
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/pry-0.9.3/lib/pry.rb:24
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/pry-0.9.3/lib/pry/pry_instance.rb:271:in `call'
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/pry-0.9.3/lib/pry/pry_instance.rb:271:in `show_result'
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/pry-0.9.3/lib/pry/pry_instance.rb:195:in `rep'
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/pry-0.9.3/lib/pry/pry_instance.rb:178:in `repl'
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/pry-0.9.3/lib/pry/pry_instance.rb:177:in `loop'
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/pry-0.9.3/lib/pry/pry_instance.rb:177:in `repl'
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/pry-0.9.3/lib/pry/pry_instance.rb:175:in `catch'
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/pry-0.9.3/lib/pry/pry_instance.rb:175:in `repl'
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/pry-0.9.3/lib/pry/pry_class.rb:113:in `start'
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/railties-3.0.10/lib/rails/commands/console.rb:44:in `start'
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/railties-3.0.10/lib/rails/commands/console.rb:8:in `start'
from /Users/andrew/code/rails_apps/example.com/vendor/ruby/1.8/gems/railties-3.0.10/lib/rails/commands.rb:23
from script/rails:6:in `require'
from script/rails:6
@anlek
Copy link
Author

anlek commented Aug 22, 2011

Submitted a ticket to pry: pry/pry#213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment