Reducing Page Flicker with Turbo Frames in Rails
Learn how to eliminate full-page reloads in Ruby on Rails using Turbo Frames to create a snappier, SPA-like experience without leaving the server-side ecosystem.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to eliminate full-page reloads in Ruby on Rails using Turbo Frames to create a snappier, SPA-like experience without leaving the server-side ecosystem.
Symptom A Rails application running on Puma with multiple threads intermittently raises ActiveRecord::ConnectionTimeoutError ("could not obtain a database connection within 5.000 seconds") under moderate load. Sampling ActiveRecord::Base.connection_pool.stat during incidents shows busy equal to the configured pool size and waiting above zero, which points at
Upon rebuilding my Postgresql database from a dump file using pg_restore , my schema file db/schema.rb is now prefixing the gen_random_uuid() function with public . create_table "cars", id: :uuid, default: -> { "public.gen_random_uuid()" } How can I prevent from the schema file from prefixing method calls with public ?
I'm getting an error message that I can't find the solution for when I'm trying to install Rails v 6.1.1 on my new Mac machine (still on Catalina, not Big Sur) I have rbenv and Homebrew installed and have updated to the latest version of Ruby (3.0.0). When I put out which ruby I get: /usr/local/opt/ruby/bin/ruby Here's the error code I'm seeing in terminal w
ActiveRecord::Base.retry_on is documented to automatically retry on database errors such as ActiveRecord::Deadlocked. The retry is implemented by re-executing the entire transaction block from the start rather than resuming mid-statement. Because the block is re-run, non-idempotent operations inside the block can execute multiple times. This includes counter
I am writing a Github action where I want to use postgres:11 image as a service. But everytime, it tries to start I get error Failed to initialize, db service is unhealthy. Github action looks like: name: CI on: [push] jobs: unit_tests: name: 'Run unit tests' runs-on: ubuntu-latest services: db: image: postgres:11 ports: ['5432:5432'] options: >- --health
I recently deleted my local project but did a git clone and picked up from where I last committed. As I tried to upload images to AWS, which was already configured, I got this error: Aws::Sigv4::Errors::MissingCredentialsError in RentalsController#create Cannot load `Rails.config.active_storage.service`: missing credentials, provide credentials with one of t
Updated app Rails 5.2 to 6, the following two migrations were added by the update: # This migration comes from active_storage (originally 20190112182829) class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0] def up unless column_exists?(:active_storage_blobs, :service_name) add_column :active_storage_blobs, :service_name, :string if conf
To minimize infrastructure costs for low-traffic workloads, Ruby on Rails applications often utilize a single-process, multi-threaded Puma configuration. This approach aims to reduce the total RAM footprint by avoiding the overhead of multiple worker processes. However, there is uncertainty regarding the relationship between thread count and memory bloat whe
answered · 28 Oct 2024, 09:00 UTC