-2
I have developed an API that connects in an oracle database is working properly in development, but when I try to run the GEM Puma in production, it gives error. command to execute
*** 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
With this I can’t start my application in Production only in DEV