Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

340
Views
¿Cómo defino entornos para db:environment:set?

Estoy tratando de configurar el entorno de mi base de datos para la staging en escena, pero aparece este error:

 $ bin/rails db:environment:set RAILS_ENV=staging rails aborted! ActiveRecord::AdapterNotSpecified: database configuration does not specify adapter /Users/bfruitman/workspace/hired/config/environment.rb:5:in `<top (required)>' /Users/bfruitman/workspace/hired/bin/rails:9:in `<top (required)>' /Users/bfruitman/workspace/hired/bin/spring:14:in `<top (required)>' bin/rails:3:in `load' bin/rails:3:in `<main>' Tasks: TOP => db:environment:set => environment (See full trace by running task with --trace)

Ya tengo una entrada en database.yml de datos.yml:

 staging: <<: *heroku

Pero eso obviamente no es lo suficientemente bueno. ¿Dónde debería estar definiendo la staging en escena?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

La mejor manera de cambiar su entorno de base de datos es con psql:

 update ar_internal_metadata set value = 'staging' where key = 'environment';

Reemplace la staging en escena con cualquier entorno que desee utilizar.

over 4 years ago · Santiago Trujillo Report

0

Probablemente necesite agregar el archivo: config/environments/staging.rb , no está incluido de forma predeterminada, por lo general empiezo copiando mi production.rb y luego hago cambios específicos de preparación (si es necesario).

cp config/environments/production.rb config/environments/staging.rb

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!