服务器启动时Redis服务器故障

Hoo*_*ils 5 ruby-on-rails redis ruby-on-rails-4

当我在OSX上启动Redis时,它退出,因为它说它无法处理RDB格式版本7。这是输出:

Server started, Redis version 3.0.7
Can't handle RDB format version 7
Fatal error loading the DB: Invalid argument. Exiting.
Run Code Online (Sandbox Code Playgroud)

gemfile中的redis gem版本是3.2.2,但是我将其更改为3.0.7,以查看它是否可以工作。没有。

我该如何解决?我那里没有任何重要内容,因此可以将其重置为其他版本,也可以卸载并重新安装Redis。

Khu*_*ali 5

我通过从 redis 文件夹中删除/home/marco/dump.rdb文件解决了这个问题。


Hoo*_*ils 2

谢谢伊塔玛。我最终通过 Homebrew 卸载并重新安装。这对我来说是最简单的解决方案,因为我在数据库中没有任何重要信息。

 brew uninstall redis
 brew install redis 
Run Code Online (Sandbox Code Playgroud)

3.0.x 与 3.2.x 不兼容,因此升级到 3.2.4 为我解决了这个问题。