在 Windows 中,rails 控制台因“切换到检查模式"而失败 [英] rails console fails with `Switch to inspect mode` in windows
问题描述
我通过rails new foo
创建了一个rails项目,然后cd foo
,然后运行rails c
.
I create a rails project by rails new foo
, then cd foo
, and run rails c
.
然后我收到了这样的消息.
Then I got message like this.
DL is deprecated, please use Fiddle
Loading development environment (Rails 4.0.2)
Switch to inspect mode.
仅此而已.我无法使用 rails 控制台.
That's all. I can't use rails console.
你知道我做错了什么吗?
Have you any idea what am I doing wrong?
我正在使用 railsinstaller
和 ruby 1.9.3 和 2.0.0,以及 ruby 2.0.0p451 (2014-02-24) [i386-mingw32]
来自 Ruby 安装程序.所有版本都失败并出现相同的错误.
I'm using railsinstaller
with ruby 1.9.3 and 2.0.0 both, and ruby 2.0.0p451 (2014-02-24) [i386-mingw32]
from Rubyinstaller. All versions fails with same error.
简单的irb
命令没有问题.
根据 Graeme 的建议,我将 rb-readline
从 0.5.0
更新为 0.5.1
.并卸载旧的.
By following Graeme's advice, I updated rb-readline
from 0.5.0
to 0.5.1
. and uninstalled old one.
$ gem list | grep rb-readline
rb-readline (0.5.1)
但信息保持不变.
推荐答案
万一有人在使用 Docker 时遇到这个错误,我得到它是因为我运行了 docker run rails
但需要 -it代码>.
In case anyone gets this error with Docker, I got it because I ran docker run rails
but needed -it
.
> docker run rails
Switch to inspect mode. # fail
> docker run -it rails
irb(main):001:0> # yay
这篇关于在 Windows 中,rails 控制台因“切换到检查模式"而失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!