PG::ConnectionBad: FATAL: password authentication failed for user "deploy" capistrano rails
1
Databases
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
> 01 PG::C...
Thuba Mamba replied
Mysql2::Error::ConnectionError: Access denied for user 'root'@'localhost' (using password: NO)
5
Databases
Hello, I have problems with my connection to mysql and rails, when I access mysql through the terminal with the root user I have no problem, but when I do a db: create rails but I get the error tha...
Elvis Serrão replied
Solved
Postgres issues
1
Databases
Hi,
So as i began a project earlier in the year, i decided to go full Docker for deployment. That was all good except debugging and stuff proved difficult so this weekend i decided to make the pro...
Tom Dringer replied
Looking for advice on how to setup a relationship.
7
Databases
I'm trying to figure out the best way to setup relationships between models which allows users to publish saved content from multiple models.
**ExampIe:**
I have a **Post** model which allows use...
Solved
How do I transfer content of production databse to my development database
0
Databases
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 would...
Shivam Barthwal posted
How to change de database of Sqlite3 to MongoDB on rails 5?
0
Databases
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"
1
Databases
Hi everyone, I have been deploying following the guides of this site. However, I had introduced the use of UUID and so I have set the use of extensions for PostgreSQL. Now, when I deploy, I get the...
Julio Cesar Fausto replied
Solved
Default Order of Associated Model Collection?
5
Databases
Hey all,
I'm working on a side project where I recently switched from SQLite to Postgres in preparation for deployment.
So, I replaced the `gem sqlite3` with `gem pg` in my Gemfile, ran`bundle i...
Chris Oliver replied
Solved
Polymorphic Search
0
Databases
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_many :histo...
Dan Tappin posted
How do I structure a Bookings table for two models?
0
Databases
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 a...
Taylor Cooney posted
find_by not returning array but class insance
0
Databases
What am I missing please?
class Choice < ApplicationRecord
belongs_to :choiceable, polymorphic: true
belongs_to :room_item, optional: false
end
create_table "choices", force: :cascade do...
jason Mardell posted
How can I improve query time in SQL ? (PostgreSQL)
1
Databases
Hi,
I have 4 models:
```
class Match < ApplicationRecord
belongs_to :tournament
scope :next, -> { where('date > ?', Time.zone.now) }
end
```
```
class Tournament < ApplicationRec...
Boris Bresciani replied
Solved
TinyTds::Error (closed connection): when using Apache/Passenger
4
Databases
When I start my application using Puma on port 3000 everything works as expected (no error). When I try to access the application after starting Apache, using the default port 80, I get the error "...
William Jones replied
Solved
Gem for Master-slave Replication
0
Databases
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
1
Databases
Hey, taking a full backup every day will be huge, so thinking of doing a full backup once in a month & incremental backups every day or so. I would like to know the best solution to achieve this.
Nithil replied
Solved
How do I improve these relationships (Rails Association question) ?
1
Databases
Im trying to make a project to practice more kinds of associations would you kindly help me understand this?
The basic idea is to have a betting game where one user generates a new bet that can on...
Nicholas Bayley replied
Solved
Design a store credit schema
0
Databases
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 ....
3
Databases
Hi,
I'm getting this wierd error.
```
NameError (undefined local variable or method `fetch_records' for #):
app/controllers/admin_controller.rb:69:in `block (2 levels) in comments'
app/controller...
Victor Nizeyimana replied
Solved
How do I switch from 1 database to 1 database per client?
6
Databases
I have a multi-tenancy app where everything is stored in 1 Postgres database. All models have a account_id, so the data a customer can see is based on his account_id. This works perfect, but due to...
Ary Rabelo replied
Solved
How do I convert a SQL query to rails?
0
Databases
Hi,
I'm new to ROR. The query I created below is functioning properly. I'm trying to prepare an interrogation. But I didn't succeed. The query is as follows;
@rad_check.tenant_id = SELECT groupn...
Emrah Yıldırım posted