Ruby学习笔记 irb Tab 代码补全 Mac OS

在 Mac OS 上 安装完 ruby 2.0.0 ,打开 irb 开始练习 Ruby ,但是发现没有Tab代码补全功能,google解决,方案如下

1、安装 bond 执行如下命令即可

sudo gem install bond

2、在当前用户根目录创建  .irbrc

vi ~/.irbrc
3、在文件中添加如下内容

require 'bond' Bond.start
4、保存关闭文件即可

再次打开 irb 就可以使用 tab 补全代码了


This is what worked for me on Mac OS 10.11.5. using rvm. Do the following :

  1. sudo gem install bond
  2. Create the file .irbrc in your home directory. vi ~/.irbrc
  3. Add the following lines in the .irbrc file require 'bond' Bond.start

  4. Save and close the file

  1. Open irb and use tab key to autocomplete

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值