Desenvolvi um API que conecta em um banco oracle está funcionando corretamente em desenvolvimento, porem quando eu tento executar a GEM Puma em produção, dá erro. comando para executar
*** SIGUSR2 not implemented, signal based restart unavailable! *** SIGUSR1 not implemented, signal based restart unavailable! *** SIGHUP not implemented, signal based logs reopening unavailable! Puma starting in single mode...
- Version 4.3.1 (ruby 2.6.5-p114), codename: Mysterious Traveller
- Min threads: 5, max threads: 5
- Environment: production
! Unable to load application: ArgumentError: Missing
secret_key_base
for 'prod uction' environment, set this string with `rails credentials:edit
Erro :
````80:in validate_secret_key_base': Missing
secret_key_basefor 'production' env ironment, set this string with
rails credentials:edit` (ArgumentError)´´´´
puma.rb max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } threads min_threads_count, max_threads_count
port ENV.fetch("PORT") { 3000 } rails_env = ENV['RAILS_ENV'] || "production" environment rails_env
Specifies the pidfile
that Puma will use.
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } plugin :tmp_restart
*** SIGUSR2 not implemented, signal based restart unavailable!
*** SIGUSR1 not implemented, signal based restart unavailable!
*** SIGHUP not implemented, signal based logs reopening unavailable!
Puma starting in single mode...
* Version 4.3.1 (ruby 2.6.5-p114), codename: Mysterious Traveller
* Min threads: 5, max threads: 5
* Environment: production
! Unable to load application: ArgumentError: Missing `secret_key_base` for 'prod
uction' environment, set this string with `rails credentials:edit
Erro :
````80:in `validate_secret_key_base': Missing `secret_key_base` for 'production' env
ironment, set this string with `rails credentials:edit` (ArgumentError)´´´´
puma.rb
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
threads min_threads_count, max_threads_count
port ENV.fetch("PORT") { 3000 }
rails_env = ENV['RAILS_ENV'] || "production"
environment rails_env
# Specifies the `pidfile` that Puma will use.
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
plugin :tmp_restart
Com isso eu não consigo startar minha aplicação em Produção só em DEV