Skip to content

Instantly share code, notes, and snippets.

@rparker
Created January 16, 2012 21:39
Show Gist options
  • Save rparker/1623167 to your computer and use it in GitHub Desktop.
Save rparker/1623167 to your computer and use it in GitHub Desktop.
~/sites/css (master⚡) rails c
Loading development environment (Rails 3.1.3)
[1] pry(main)> whereami
Error: Cannot find local context. Did you use `binding.pry`?
[2] pry(main)> c = County.where("nam = ?", 'dek').first;
Error: Cannot find local context. Did you use `binding.pry`?
[3] pry(main)> c.nam
NameError: undefined local variable or method `c' for main:Object
from (pry):1:in `<main>'
[4] pry(main)> c = County.where("nam = ?", 'dek')
Error: Cannot find local context. Did you use `binding.pry`?
(pry) output error: #<NoMethodError: undefined method `message' for true:TrueClass>
[5] pry(main)> c.nam
NameError: undefined local variable or method `c' for main:Object
from (pry):2:in `<main>'
[6] pry(main)> County.count
(0.3ms) SELECT COUNT(*) FROM `counties`
=> 36
[7] pry(main)> c = County.count
Error: Cannot find local context. Did you use `binding.pry`?
[8] pry(main)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment