Running rails console with bundle exec

2019-03-31 04:52发布

When I execute bundle exec rails c I get a ruby console with the following prompt

Loading development environment (Rails 3.0.3)
jruby-1.6.3 :001 >

Everything looks in order but when I use the ↑ ↓ arrows to pull my previous command I get ^[[A^[[B output into my console.

Running rails console without bundle exec works fine. Any reason as to why this is? Is bundle exec starting up some new faux shell?

1条回答
甜甜的少女心
2楼-- · 2019-03-31 05:33

It looks like bundler prevents the irb console from using readline. You can work around this by putting the following line in your .irbrc, which will force irb to use readline:

IRB.conf[:USE_READLINE] = true
查看更多
登录 后发表回答