Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 运行带有bundle exec的rails控制台_Ruby On Rails_Ruby_Bundler - Fatal编程技术网

Ruby on rails 运行带有bundle exec的rails控制台

Ruby on rails 运行带有bundle exec的rails控制台,ruby-on-rails,ruby,bundler,Ruby On Rails,Ruby,Bundler,当我执行bundle exec rails c时,我会得到一个ruby控制台,提示如下 Loading development environment (Rails 3.0.3) jruby-1.6.3 :001 > 一切看起来都井然有序,但当我使用↑ ↓ 将上一个命令的^[[A^[[B输出拉入控制台的箭头 在没有bundle exec的情况下运行rails控制台工作正常。有什么原因吗?bundle exec是否启动了一些新的仿shell?看起来bundler阻止irb控制台使用read

当我执行bundle exec rails c时,我会得到一个ruby控制台,提示如下

Loading development environment (Rails 3.0.3)
jruby-1.6.3 :001 >
一切看起来都井然有序,但当我使用↑ ↓ 将上一个命令的
^[[A^[[B
输出拉入控制台的箭头


在没有bundle exec的情况下运行rails控制台工作正常。有什么原因吗?bundle exec是否启动了一些新的仿shell?

看起来bundler阻止irb控制台使用readline。您可以通过在
.irbrc
中放入以下行来解决此问题,这将强制irb使用readline:

IRB.conf[:USE_READLINE] = true

你的操作系统和终端程序是什么?另外,如果使用unix操作系统,你的home dir中有
.inputrc
吗?在安装jruby 1.6.3后,我可以复制这个,在linux上使用zshDid,你可以着手解决这个问题吗?如果你知道的话,我会对根本原因感兴趣。这显然是一个黑客行为,我建议你在这里向bundler提交一个bug:Thanks Benoit,这帮助我在Linux Precise/Unity机器上使用Rails 2.3.8和JRuby 1.6.7。我复制了你的评论,但链接到了你原来的帖子,希望没有冒犯。