1
0
Fork 0

Document issue and workaround wth Spring preloader

This commit is contained in:
Andrew Tomaka 2019-11-05 22:01:26 -05:00
parent c952bc8123
commit 5b64ea4989
Signed by: atomaka
GPG Key ID: 61209BF70A5B18BE
1 changed files with 20 additions and 0 deletions

View File

@ -23,6 +23,26 @@ And then execute:
Set the `PARAMETER_STORE_PATH` environment variable with the AWS Parameter
Store path that you wish to load.
### Spring preloader
The Spring preloader does not detect environment variable changes as
application changes. This means that when using Spring, new or changed
environment variables from AWS SSM Parameter Store will not become available
immediately. This also applies to any change to `PARAMETER_STORE_PATH`.
There are two work-arounds. You can force Spring to restart by killing it with
`bundle exec spring stop`.
Alternatively, you can update your Spring configuration to reload variables
using Psenv after the process forks. To do this, add the following configuration
to `config/spring.rb`:
```
Spring.after_fork do
Psenv.load
end
```
### Plain Ruby
Add this line to your application's Gemfile: