So I was following along a tutorial on youtube to do a "todo list with ruby on rails using stimulus reflex" ->(https://www.youtube.com/watch?v=eK1CM0MBF64&ab_channel=TechmakerTV)
And my server crashed after I implemented reflex and gave me this big error:
Started GET "/cable" for ::1 at 2021-09-16 20:09:14 +0300Started GET "/cable/" [WebSocket] for ::1 at 2021-09-16 20:09:14 +0300Successfully upgraded to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)#<Thread:0x0000022052d02608 C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/actioncable-6.1.4.1/lib/action_cable/subscription_adapter/redis.rb:150 run> terminated with exception (report_on_exception is true):C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:384:in `rescue in establish_connection': Error connecting to Redis on localhost:6379 (Redis::TimeoutError) (Redis::CannotConnectError) from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:365:in `establish_connection' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:117:in `block in connect' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:330:in `with_reconnect' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:116:in `connect' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:311:in `with_socket_timeout' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:161:in `call_loop' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/subscribe.rb:44:in `subscription' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/subscribe.rb:14:in `subscribe' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis.rb:3613:in `_subscription' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis.rb:2376:in `block in subscribe' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis.rb:70:in `block in synchronize' from C:/Ruby30-x64/lib/ruby/3.0.0/monitor.rb:202:in `synchronize' from C:/Ruby30-x64/lib/ruby/3.0.0/monitor.rb:202:in `mon_synchronize' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis.rb:70:in `sync
Just keeps going and goind until it crashes.
/subscription_adapter/redis.rb:154:in `block in ensure_listener_running'C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/connection/ruby.rb:156:in `rescue in connect_addrinfo': Redis::TimeoutError (Redis::TimeoutError) from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/connection/ruby.rb:153:in `connect_addrinfo' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/connection/ruby.rb:192:in `block in connect' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/connection/ruby.rb:190:in `each' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/connection/ruby.rb:190:in `each_with_index' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/connection/ruby.rb:190:in `connect' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/connection/ruby.rb:304:in `connect' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:371:in `establish_connection' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:117:in `block in connect' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:330:in `with_reconnect' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:116:in `connect' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:311:in `with_socket_timeout' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/client.rb:161:in `call_loop' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/subscribe.rb:44:in `subscription' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis/subscribe.rb:14:in `subscribe' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis.rb:3613:in `_subscription' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis.rb:2376:in `block in subscribe' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis.rb:70:in `block in synchronize' from C:/Ruby30-x64/lib/ruby/3.0.0/monitor.rb:202:in `synchronize' from C:/Ruby30-x64/lib/ruby/3.0.0/monitor.rb:202:in `mon_synchronize' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/redis-4.4.0/lib/redis.rb:70:in `sync
Any idea what might fix the problem?