How do I transfer content of production databse to my development database
Dear experts, I have a rails application that I was running on production environment. The data upon interacting with application on browser was therefore added to the production database. I wou...Shivam Barthwal posted
How to change de database of Sqlite3 to MongoDB on rails 5?
Hello guys i have a project Rails 5 with database sqlite3 and a lot scaffolds, but now i need change the databse for MongoDB, but the MongoDB dont use the active record. How i change this or remove...Thomaz Wanderbruck Schmidt posted
PG::InsufficientPrivilege: ERROR: permission denied to create extension "pgcrypto" HINT: Must be superuser to create this extension. : CREATE EXTENSION IF NOT EXISTS "pgcrypto"
For anyone having this issue in 2020, the problem is that the user `deploy` was not created with SUPERUSER privileges which are required to create/enable extensions in Postgres. In order to sol...Julio Cesar Fausto replied • Solved
Default Order of Associated Model Collection?
I know right?! Seriously amazing people here. Welcome to the group! 🤓Chris Oliver replied • Solved
I have a basic model structure like this: ``` class History < ActiveRecord::Base belongs_to :historical, polymorphic: true, touch: true end ``` with several related models: `has_m...Dan Tappin posted
How do I structure a Bookings table for two models?
I've primarly built out support to book a flight, and now I'm looking to offer the ability to book a hotel as well. I'm looking for some insight on the best way to model this: Currently there is...Taylor Cooney posted
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...Jacob Abraham posted
How do I manage business hours for a store?
Thanks @ChrisOliver. I got it working with your help! I really appreciate it, it seems rather trivial but a core function of my app - also, it seems like between the two of us we've provided the mo...Taylor Cooney replied • Solved
PG::ConnectionBad: FATAL: password authentication failed for user "deploy" capistrano rails
Hi I am working on deploying rails application to digital ocean everything is worked fine. just stuck on that final step: when I am runing `cap production deploy` I am getting >...Hitesh Ranaut posted
403 errors on Nginx server
Hello, I have installed ruby on rails on digital ocean with NGINX and Passanger. the site was working find but after trying to install free ssl, it goes full wrong. i was following this article...SMEHSAN posted
find_by not returning array but class insance
What am I missing please? class Choice < ApplicationRecord belongs_to :choiceable, polymorphic: true belongs_to :room_item, optional: false end create_table "choices", force: :cas...jason Mardell posted
How can I improve query time in SQL ? (PostgreSQL)
Any ?Boris Bresciani replied • Solved
TinyTds::Error (closed connection): when using Apache/Passenger
Hello Chris, I am only using Puma or Passenger, definitely not both at the same time. When using Puma I start the rails server (i.e rails s -e production) from the application directory and the pa...William Jones replied • Solved
Gem for Master-slave Replication
Hi, I'm trying to make master-slave replication(One master(write/read) and one slave(read only)) for my database(mysql 8 / rails 4.2). I researched whole day but I'm still considering which gem is ...Sean posted
How to do a incremental backup
I was using postgres database. Changed wal_level to replica, & turned on archive_mode. Then it started generating wal files, which I used to restore to point in time recovery.Nithil replied • Solved
How do I improve these relationships (Rails Association question) ?
Your `Bet` model would have two `belongs_to` associations (one for the creator and one for the backer or however you'd like to call them): ``` class Bet < ApplicationRecord belongs_to :cr...Nicholas Bayley replied • Solved
Design a store credit schema
Hi, I was wondering if anyone has some experience building a store credit system into a market place style app. Eg: Users could purchase 100USD in adavance and receive 120USD in store credits as in...gafemoyano posted
NameError (undefined local variable or method `fetch_records' for ....
Hey Chris, I found the solution. https://github.com/jbox-web/ajax-datatables-rails/blob/master/doc/migrate.md I used the old methods... Thanks for your help! and support!Victor Nizeyimana replied • Solved
How do I switch from 1 database to 1 database per client?
I believe you should consider to read this before migrate to the multi tenant way. https://influitive.io/our-multi-tenancy-journey-with-postgres-schemas-and-apartment-6ecda151a21fAry Rabelo replied • Solved