$ rails secrets:setup
-> copy the long secret key in the first line and set it as an environment variable RAILS_MASTER_KEY when executing rails$ rails secret
-> you will get the longer key; copy it$ EDITOR=vim rails secrets:edit
write the following and save it from vim$ rails server --environment production
An unhandled lowlevel error occurred. The application logs may have details.
$ rails secrets:setup
$ EDITOR=vim rails secrets:edit
Rails.application.secrets.postgresql_password