Semi-permanently remembers Rails | pry's input history (leaves the history even when pry finishes) [Mac OS X]
Solution
Put rb-readline with pry-rails.
gem 'pry-rails' gem 'rb-readline'
$ bundle install
Launch the Rails console.
$ bundle exec rails console
This is the solution! You can use the up and down keys on the keyboard to follow previous input history.
problem
pry doesn't record input history at all.
To be precise, it will remember during one session. exit
, everything disappears at the next start.
By default all history settings are true. I also confirmed that .pry_history
exists.
Pry.config.history.should_save # => true Pry.config.history.should_load # => true Pry.config.history.file # => "/Users/yinaura/.pry_history"
And despite the history being written to.pry_history. It can not only read.
It was useless to write load processing to .pryrc.
Pry.history.load
However. Manually run Pry.history.load
after launching Pry.history.load
to load the history. But it's too much trouble to do every time.
The solution is at the beginning.
환경
gem 'pry-rails' gem 'rb-readline'
pry doesn't record input history at all.
To be precise, it will remember during one session.
exit
, everything disappears at the next start.By default all history settings are true. I also confirmed that
.pry_history
exists. Pry.config.history.should_save # => true Pry.config.history.should_load # => true Pry.config.history.file # => "/Users/yinaura/.pry_history"
And despite the history being written to.pry_history. It can not only read.
It was useless to write load processing to .pryrc.
Pry.history.load
However. Manually run
Pry.history.load
after launching Pry.history.load
to load the history. But it's too much trouble to do every time.The solution is at the beginning.
환경
참조
Managing History · pry / pry Wiki
Problem loading history #1418
Original by
Rails | pry의 입력 이력을 반영구적으로 기억시킨다 (pry가 종료해도 이력을 남긴다) [Mac OS X]
About
About this translation
Reference
이 문제에 관하여(Semi-permanently remembers Rails | pry's input history (leaves the history even when pry finishes) [Mac OS X]), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/YumaInaura/items/149b7042ef62b54f861b
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
About this translation
Reference
이 문제에 관하여(Semi-permanently remembers Rails | pry's input history (leaves the history even when pry finishes) [Mac OS X]), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/YumaInaura/items/149b7042ef62b54f861b텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)