Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

336
Vistas
How do I define environments for db:environment:set?

I'm trying to set my database environment to staging but I get this 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)

I already have an entry in database.yml:

staging:
  <<: *heroku

But that's obviously not good enough. Where should I be defining staging?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

The best way to change your db environment is with psql:

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

Replace staging with whatever environment you want to use.

over 4 years ago · Santiago Trujillo Denunciar

0

You probably need to add the file: config/environments/staging.rb, it is not included by default, I usually start by copying my production.rb and then making any staging specific changes (if needed).

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

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda