简体   繁体   中英

Running rails console with bundle exec

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM