Writing tests with RSpec for Redis with Rails
I have a model class that caches data in redis. The first time I call a method on the model, it computes a JSON/Hash value and stores it in Redis. Under certain circumstances I 'flush' that data and it...
View ArticleRedis::TimeoutError: Connection timed out Error -Rails cache
We are using redis(Elasticache) as our cache store.We are experiencing crashes in our app due to redis connection timeout.We have three app servers and use phusion passenger.At the time of crashes...
View ArticleUsing Redis to Keep Track of Page Views from Incoming Traffic
I'm trying to use Redis to keep track of page views so I can figure out which pages get the most views from incoming traffic (rather than from browsing within the site). However, right now when I check...
View ArticleRedis for Storing session for Rails. why my key is hashed value?
I use redis for storing rails session.Rails.application.config.session_store :redis_store, url: ENV['REDIS_URL'], key: '_my_site_session', expire_after: 1.dayI can see that in client browser (Cookies),...
View ArticleHow to connect to elastic cache in rails
I am looking for a way to connect the rails application to elastic cache for storing the cache. For testing purpose I try to test with redis-cli which is working fine. Is there any library or...
View ArticleSidekiq + redis + docker-compose + rails
I configured my project to work with the listed technologies, but when requesting the route http://localhost: 3000/sidekiq, it gives the error Error connecting to Redis on 127.0.0.1:6379 (Errno ::...
View ArticleDeploy Ruby on Rails app with railway.app
I'm trying to deploy my app on railway.app with Redis (using Sidekiq).I'm using buildpacks and the problem is I have 2 buildpacks and railway says in its documentation only one buildpack is executed in...
View ArticleSidekiq not finding records for Rails Active Job
Jobs are queued on after a user is created like so in the modeluser.rbafter_create_commit :profile_photo_jobdef profile_photo_job message = "Add a profile photo" ReminderJob.set(wait:...
View ArticleHow to investigate suddenly increase items of Redis
So far, items count and freeable memory of Redis kept flat.But few weeks ago, these metrics make linear change.We assume same amount of items which have not been set expire stack up everyday.We want to...
View Article"Subscription class not found" with ActionCable and Rails 6 API
I use ruby 3.0.2p107, Rails 6.1.6 and I've a Rails backend (API) and a React Typescript frontend.Backend code# app/channels/notification_channel.rbclass NotificationChannel <...
View ArticleSidekiq Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED) on...
I'm trying to run sidekiq worker with Rails. When I try to docker-compose up worker I get the following error:worker_1 | Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED)worker_1 |...
View ArticleError connecting to Redis on 127.0.0.1:6379(ECONNREFUSED) on rails application
By using Redis, I tried creating ranking system on Ruby on rails. My environments: windows10, vagrant, Ruby -v 2.2.3, rails -v 4.2.5, mysql2 -v 0.3.18...However I got the following error.Error...
View ArticleAction Cable in Sidekiq Worker production
Is it possible to broadcast using ActionCable from a background job using sidekiq? On development this works fine. In production my channels do not receive the broadcast. When I use...
View ArticleRedis Server Failure when server starts
When I start redis on OSX, it exits because it says it can't handle RDB format version 7. Here's the output:Server started, Redis version 3.0.7Can't handle RDB format version 7Fatal error loading the...
View ArticleRails 6.0 Resque Redis and Auth
Im using rails 6.0 with resque, redis and I can't get rails server to start because i've got AUTH issues and get the following when i start rails...
View Articleusing ShopifyAPI::GraphQL.client in low-level Rails cache results in...
I have a Rails cache set up with Redis running under Heroku. When calling the ShopifyAPI::GraphQL client inside of a Rails.cache.fetch block:Rails.cache.fetch(product_id, expires_in: 1.hours) do client...
View ArticleWhy doesn't Redis work with my Rails application?
I'm currently using Rails 6 and Linux mint Cinnamon 20.2, and I have problems with Redis configuration / setupping in my Rails application.My problem is that my ActionCable doesn't work well.I would...
View ArticleActionCable and Heroku Redis configuration
Last week RedisToGo was terminated on Herokum, leaving me with no choice but to find an alternative. I got a new subscription from Heroku: Heroku Redis.Everything seems to work fine (all tasks/jobs)...
View ArticleRails: Reconfigure turbo stream not to use Redis
Last week I was working through a chat app tutorial that guided me through using Redis for a turbo stream. But then I stumbled across DHH's demo of Rails 7 where he hooks up the broadcast simply using...
View ArticleHerkou Redis - certificate verify failed (self signed certificate in...
I have been using heroku redis for a while now on one of my side projects. I currently use it for 3 thingsIt serves as a place for me to store firebase certificatesIt is used for caching data on the...
View Article