问题
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.
That's all. I can't use rails console.
Have you any idea what am I doing wrong?
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.
There is no problem with simple irb
command.
Edit
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)
But the message remains same.
回答1:
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
回答2:
This is a known problem caused by the rb-readline
gem in version 0.5.0. It has been subsequently fixed in 0.5.1 which came out a few months ago.
You should therefore upgrade the rb-readline
gem to v0.5.1 to fix this problem.
You can see here more details about the issue and the resolution.
来源:https://stackoverflow.com/questions/23578440/rails-console-fails-with-switch-to-inspect-mode-in-windows