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.
environment
- pry (0.10.3)
- pry-rails (0.3.4)
- rb-readline (0.5.3)
- Rails 4.0.0
- OSX Yosemit 10.10.4
reference
Original by
Original by
Rails | pry の入力履歴を半永久的に記憶させる ( pry が終了しても履歴を残す ) [Mac OS X]
About
Author And Source
この問題について(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に含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .