Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
仕様に fakeredis ジェムを使用するコードを使用していますが、REPL からこれらの仕様を実行するたびに、fakeredis は残り、コマンドのようなものRedis.newは fakeredis を提供します。実際の redis ストアに再びアクセスできるようにするには、無効にする必要があります。
Redis.new
REPLで無効/有効にする方法はありますか?
2 つの解決策は、fakeredis メモリ クラスを削除します。
Redis::Connection.drivers.delete_if {|d| d == Redis::Connection::Memory }
または、Ruby アダプターを再度追加します。
Redis::Connection.drivers << Redis::Connection::Ruby
ソース: https://github.com/guilleiguaran/fakeredis/issues/63