11/08/2018, 21:27

Tên biến không dùng được trong Ruby binding.pry console

Bật rails console debug và thì gặp lỗi như sau: [1] pry(main)> s = Post.search query: { match: { title: 'selenium' } } } Error: Cannot find local context. Did you use `binding.pry`? binding.pry có vẻ định nghĩa các hàm s, n, c (step, next, continue) nên trong console không dùng được các ...

Bật rails console debug và thì gặp lỗi như sau:

[1] pry(main)> s = Post.search query: { match: { title: 'selenium' } } }
Error: Cannot find local context. Did you use `binding.pry`?

binding.pry có vẻ định nghĩa các hàm s, n, c (step, next, continue) nên trong console không dùng được các biến có tên như thế.

https://github.com/nixme/pry-nav/issues/3
https://github.com/pry/pry/issues/492

0