Activerecord adapter for sqlserver is loaded AFTER connection attempt is being made (?)

0
Databases
Hi! I am deploying a rails 7 app (7.2.2) on ruby 3.3.5 with an AR adapter for sqlserver (activerecord-sqlserver-adapter). As of version 7.2 the adapters have to to register themselves with AR in o...
Mark Hapke posted

How do I modify the query used to eager load associations

0
Databases
Hi, I have a classic hierarchical entity with single level of nesting ``` class Job < ApplicationRecord has_many :children, class_name: 'Job', foreign_key: 'parent_id' belongs_to :parent, op...
mchwalek posted

Transactions

2
Databases
If I am working on a db with millions of users and i have a job that requires updating multiple tables, what is the best way to approach this? I was thinking to wrap it in a transaction but the iss...

How we can use Like queries for searching on encrypted data? I used default Active Record Encryption

0
Databases
class Propose < ApplicationRecord encrypts :email, :phone_number, :name, deterministic: true scope :search_filter, -> (params) do if params[:keyword].present? where(search_filte...
Vishwani patlan posted

How do I manage business hours for a store?

8
Databases
I've taken a few stabs at this over the past two months and haven't found a great solution for what seems to be a straightforward feature seen in applications such as SkipTheDishes and UberEats. G...
Solved

ibm Iseries AS/400 DB2

4
Databases
I'm trying to connect using some of the gems:sequel, dbi, ibm_db, jdbc-as400-adapterWithout success, does anyone have the same problem?
Solved

Cómo actualizar PostgreSQL 13.12 a 13.14

0
Databases
Buenas estimados, quisiera saber cómo actualizar la versión 13.12 a 13.14, actualmente apliqué sudo yum update postgresql13, si embargo actualizó y ahora me devuelve lo siguiente, pero sigue en la ...
Isaac Rodríguez Varela posted

Rails 7 and postgres 15

9
Databases
I've got Postgres15 installed via Homebrew, and it's running. When I build a new Rails 7 app with: "rails new testapppg -d postgres" I can't get it to install pg (1.4.6) I see errors like "Unable ...
Randy Medina replied

Anyone using Litestack + SQLite in Production

2
Databases
How's it going? Any gotcha's worth sharing? Any special configs to getting it set up with hatchbox?
Rich Smith replied

How do I have 2 users associated with a model

0
Databases
I have a model that I want 2 users to have an association with. So this model would have a proposer (user) and a challenger (a different user). I am getting a bit tied up in spaghetti around whethe...
dwedigital posted

Storing measurements for users in metric and english measurement systems

1
Databases
I am rebuilding an application that stores data for search and recovery divers. Previously, it was for a single team and we used the english measurement systems, however, now that the application i...
Chris Oliver replied

No value provided for option '--orm' Error

2
Databases
Question: I tried to set up a polymorphic model and got the following error: no value provided for option '--orm' I'm using Rails 7 and postgresql I tried most probably solutions I found and revi...

Database connect

0
Databases
Hello and a wonderful day at all. I'm a new RVM, Ruby and Rails user and I have a problem. My problem is: I can't connect my App to a database. My System: - OS: Rocky Linux on a Hypervisor VM - ...
RubySnug posted

Anyone have any brilliant solutions for connecting to Snowflake.

0
Databases
I am currently using ODBC connection with 'ruby-odbc' and 'Sequel' gem but I am finding it incredibly slow. Thirty-Five seconds to load 12 records while it was instantaneous with the now retired M...

What could be the best way to deal with addresses in terms of database structure and perfomance?

2
Databases
I'm creating an app for my company. In that application there are a lot of addresses because for Owner, Store, Landlord, etc needs to have address. At first I was thinking to create separate model...
Willard replied

Database Disconnect Error

0
Databases

Where do I put a custom validator for a model?

4
Databases
I'm confused about where to put code for a custom validator I wrote, should I create a nested class inside the model file? or create a new file in models/concerns? I have the code but don't know wh...
Stéphane Paquet replied
Solved

Multi Tenant based database can connect into another database like multi-db connection?

0
Databases
I've been working on one project that has already implemented a multi-tenant database setup using the apartment gem. and now I need to connect this multi-tenant database to my other project. I've c...
vinay sharma posted

I am running into some strange error when I upgraded my app to rails version 6 and pushed to heroku that is connected to Amazon RDS.

0
Databases
I am getting the following error: ActiveRecord::StatementInvalid (PG::InsufficientPrivilege: ERROR: permission denied for relation users.. It is definitely a role issue but I am not sure what coul...

Want to stay up-to-date with Ruby on Rails?

Join 88,834+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.