문제

I'm trying to update irb on my OS X 10.5 macbook:

$ irb -v
irb 0.9.6(09/06/30)

I'm currently learning Ruby and was following the "Why's Poignant Guide to Ruby" and on this page: http://mislav.uniqpath.com/poignant-guide/book/expansion-pak-1.html they mention auto-completion in irb requires version 1.8 of irb.

I'm not sure entirely how to update the shell. I'm using the latest version of ruby through RVM.

$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29034) [i386-darwin9.8.0]

Google has returned nothing, I'd appreciate any help, thanks!

도움이 되었습니까?

해결책

with rvm you can turn on completion: https://rvm.io/workflow/completion/

this loads the scripts in your ~/.rvm/scripts dir including irbrc.rb which sets up autocompletion for irb.

다른 팁

You don't need to upgrade IRB. You do, however, need Ruby compiled with Readline support. On OS X, I have no idea if that's the default configuration or how to go about installing it. You'll probably need to install the readline development libraries and recompile Ruby via RVM.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top