Store Rails session using Redis
The default session store for Rails is cookie_store. This makes the session be stored on the client side (correct me if I am wrong).I want to change this default behavior, so that I can store the...
View ArticleWhen upgrading heroku to the latest stack cache slug is not being used
So I am trying to upgrade Heroku to the latest stack (from Heroku-18 to Heroku-20).The upgrade seems fine except for one thing.We are using Review Apps with the Heroku-CI and tests take about 11 min to...
View ArticleRails 4 and Rails 5 share session in Redis
I have two apps. rails 4.2 and 5.1. Both are looking at the same Redis storage(session). I try to share session between them, but i stuck in the moment:4.2 version stores and get session in that way:...
View ArticleSidekiq throws Redis::CommandError
I have this redis container I use for Sidekiq/Rails and also set up rabbitmq a few days ago on the same docker host. Ever since I keep getting these errors:UNBLOCKED force unblock from blocking...
View ArticleRedis, Sidekiq and Heroku Apps
I have two Rails Apps that need to share some state. Each App needs to run background jobs during their execution lifetimes. I added Heroku Redis to each App, and Sidekiq. So when I run background...
View ArticleHow can I stop active record callbacks from throwing an error when they fail?
I have a Rails app that includes some after_save active record callbacks, which are responsible for updating a second cache database.Recently I was having some load issues and the second database was...
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 ArticleSocketError at / getaddrinfo: nodename nor servname provided, or not known
I am running Ruby on Rails api and I added the 'ahoy_matey' gem.when I restart de rails server, I am getting this error:SocketError at /getaddrinfo: nodename nor servname provided, or not known.I use...
View ArticleRails ActiveJob - how to stop job from being enqueued in before_enqueue
I am running Rails 4.2.8 and I want to make my job only run under certain conditions. Currently I am doing that check in the code that is calling the job but it would be much cleaner to contain the...
View Articlewrong number of arguments (given 3, expected 2)
Is there a conflict between ruby 3.0, rails 6.0.3 and redis-rb 4.2.5 ?Because I found that:irb(main):002:0> Rails.cache.write('test',1)Traceback (most recent call last): 2: from (irb):1:in...
View ArticleActionCable - Puma - Nginx - SSL
I'm totally new to ActionCable... Trying to set up Action cable on a Rails 6.0 application (Nginx + Puma). I also have to say my environment is on the cloud (DigitalOcean.com), and that is SSL.My...
View ArticleTrouble starting the redis server
I am using rails and want to run sidekiq and running sidekiq requires a Redis server to be installed. I installed Redis for my KDE Neon by following the instructions from the digital ocean. Here is the...
View ArticleSearch Rails Redis by Batch ID
Stephanie here ... how do I search Rails Redis by Batch ID to find the logs?I successfully queried Redis smembers to retrieve the batch IDs by how do I use the IDs to search the logs for those batch...
View ArticleSidekiq does not see changes in database table
Versions:ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]Rails 5.1.7sidekiq 6.0(Gem)In my application I can add one string column and this column is added to a database table that is used to...
View ArticleIs it possible to enqueue some Sidekiq workers into an external redis queue?
I have a Rails app A with its own sidekiq and redis server. We are in the process of merging another app B into app A. App B also has its own sidekiq and redis server.As an intermediary step for the...
View ArticleRedis::CannotConnectError: Error connecting to Redis SocketError:...
I'm getting the above errors when I try to run rails db:seed, which uses Sidekiq to enqueue jobs for database generation. I've been trying a variety of fixes related to getting/setting the correct...
View ArticleRails Redis Cache stores empty information out of method
My user.rb (model) has the following instance method: def points_last_seven_days last_seven_days_hash_raw = self.reports.group_by_day(series: true) { |r| r.created_at } out = {}...
View ArticleNameError: uninitialized constant for sidekiq worker in production but works...
I'm setting up a background task with sidekiq and redis. Have it working completely fine in development, but when testing on staging site I get:NameError: uninitialized constant...
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 ArticleUpgrade redis from v2 to v4 on Windows causes Rails connection error
BackgroundMy dev environment is Windows, Rails cache_store worked fine for redis V2.I am implementing ActiveJob with sidekiq, which required redis >= v3I installed Redis for Windows from GitHub, I...
View Article