Quantcast
Browsing all 42 articles
Browse latest View live

Puma zero downtime deployment with cluster mode and preload_app - what...

Right now I have my puma setup successfully running, with zero downtime deployment via phased restarts (served behind nginx).It works pretty nice, since no connections are lost and the new versions are...

View Article


Answer by BvuRVKyUVlViVIc7 for Naming conventions for Rails migrations

I would split up multiple schema changes into multiple migrations so that you can easily name the single migrations!

View Article


Answer by BvuRVKyUVlViVIc7 for Shrine gem - how to prevent deletion of...

I found a nice and clean way...In your shrine.rb initializer just create a custom class:class NoDeletionShrineS3Storage < Shrine::Storage::S3 def delete(id) true end def...

View Article

Answer by BvuRVKyUVlViVIc7 for How to find the longest string in a column...

With MySql:# Change your model name and field to your needsParticipant.order("MAX(CHAR_LENGTH(first_name)) desc").limit(1)# works too:Participant.order("MAX(CHAR_LENGTH(first_name)) desc").first# and...

View Article

Can a node autoscaler automatically start an extra pod when replica count is...

our autoscaling (horizontal and vertical) works pretty fine, except the downscaling is not working somehow (yeah, we checked the usual suspects like...

View Article


Answer by BvuRVKyUVlViVIc7 for How to connect to primary database and shards...

In general it's absolutely fine to switch connections with an around filter, we have been doing this for years (even before Rails 6) in my previous company.Btw: did you see that the guide is mentioning...

View Article

How to upgrade Rancher 2.4, created by quicksteps on Digital Ocean

some weeks ago we created our rancher installation on Digital Ocean by following these steps: https://rancher.com/docs/rancher/v2.x/en/quick-start-guide/deployment/digital-ocean-qs/Now we want to...

View Article

Answer by BvuRVKyUVlViVIc7 for How to upgrade Rancher 2.4, created by...

We just removed the old installation and imported the cluster again in the new rancher installation.

View Article


Answer by BvuRVKyUVlViVIc7 for Possible to remove cluster from 2.4.8 server...

Just to give some feedback after we solved it by our selfes:We removed the old installation and imported the cluster again in the new installation, worked fine wihtout problems.We also had another...

View Article


Possible to remove cluster from 2.4.8 server and import it on a fresh 2.5...

due to a wrong installation method (single node) we would like to migrate our existing kubernetes cluster to a newer and HA-rancher-kubernetes cluster.Can someone tell me if it’s safe to do...

View Article

MiniTest - ReRun only failed tests

Is it possible to let minitest run only the failed tests via rake task?Couldnt find anything in internet about this...With rspec or cucumber it worked.. Is there any possibility here?

View Article

helmfile best practices with multiple customers

We would like to have some recommendations, since we want to integrate helmfile in our deployment process...Our infrastructure has following details:we have many customersall customers have the same...

View Article

Answer by BvuRVKyUVlViVIc7 for Android - WorkManager - Result.success()...

I had a similar problem, and it looks like the queue was full from previous Workmanager enqueuings.I did following during application start and now it works fine:...

View Article


Rails - Best-Practice: How to create dependent has_one relations

What's the best practice to create has_one relations?For example, if I have a user model, and it must have a profile...How could I accomplish that?One solution would be:# user.rbclass User <<...

View Article

Answer by BvuRVKyUVlViVIc7 for Rails - Dynamic query all records from...

You should take a look at the named routes feature in Ruby on Rails: https://guides.rubyonrails.org/routing.html#path-and-url-helpersCreating a resourceful route will also expose a number of helpers to...

View Article


Decode base45 string

We are trying to implement the verification of the new EU corona virus test/vaccination certificates, but can't get the base45 decoding working.Specification is here:...

View Article

Answer by BvuRVKyUVlViVIc7 for Devise login succeed when not confirmed

argh...I set the wrong configuration in devise.rb # ==> Configuration for :confirmable # The time you want to give your user to confirm his account. During this time # he will be able to access your...

View Article


Devise login succeed when not confirmed

Could you tell me how to integrate the confirmed? attribute into the session-login process?I've set up a working app with devise with confirmable and authenticatable enabled...But I can log in with a...

View Article

Answer by BvuRVKyUVlViVIc7 for Dynamic concerns with inheritance not loading...

Actually it's a feature of Rails that the same module doesn't get loaded multiple times.We started to use the normal ruby module inclution hooks and it worked fine!module CustomConcern def...

View Article

Dynamic concerns with inheritance not loading twice, but only once

We are loading code dynamically with concerns, based on some environment variables, which works pretty nice.Something like this:# User classclass User include DynamicConcernendmodule DynamicConcern...

View Article
Browsing all 42 articles
Browse latest View live