I create a rails project by rails new foo
, then cd foo
, and run rails c
.
我通过rails new foo创建一个rails项目,然后是cd foo,并运行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.
就这样。我不能使用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.
我正在使用带有ruby 1.9.3和2.0.0的railsinstaller,以及来自Rubyinstaller的ruby 2.0.0p451(2014-02-24)[i386-mingw32]。所有版本都失败并出现相同的错
There is no problem with simple irb
command.
简单的irb命令没有问题。
Edit
By following Graeme's advice, I updated rb-readline
from 0.5.0
to 0.5.1
. and uninstalled old one.
按照Graeme的建议,我将rb-readline从0.5.0更新为0.5.1。并卸载旧的。
$ gem list | grep rb-readline
rb-readline (0.5.1)
But the message remains same.
但信息仍然相同。
2 个解决方案
#1
20
In case anyone gets this error with Docker, I got it because I ran docker run rails
but needed -it
.
如果有人用Docker得到这个错误,我得到它,因为我运行了docker run rails但需要-it。
> docker run rails
Switch to inspect mode. # fail
> docker run -it rails
irb(main):001:0> # yay
#2
1
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.
这是由版本0.5.0中的rb-readline gem引起的已知问题。它随后在几个月前发布的0.5.1中得到修复。
You should therefore upgrade the rb-readline
gem to v0.5.1 to fix this problem.
因此,您应该将rb-readline gem升级到v0.5.1以解决此问题。
You can see here more details about the issue and the resolution.
您可以在此处查看有关该问题和解决方案的更多详细信息。
#1
20
In case anyone gets this error with Docker, I got it because I ran docker run rails
but needed -it
.
如果有人用Docker得到这个错误,我得到它,因为我运行了docker run rails但需要-it。
> docker run rails
Switch to inspect mode. # fail
> docker run -it rails
irb(main):001:0> # yay
#2
1
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.
这是由版本0.5.0中的rb-readline gem引起的已知问题。它随后在几个月前发布的0.5.1中得到修复。
You should therefore upgrade the rb-readline
gem to v0.5.1 to fix this problem.
因此,您应该将rb-readline gem升级到v0.5.1以解决此问题。
You can see here more details about the issue and the resolution.
您可以在此处查看有关该问题和解决方案的更多详细信息。