spring
spring copied to clipboard
Changes in environment files are not getting picked up
As the following example demonstrates, after I edit config/environments/development.rb, even though it seems Spring properly restarts, the changes are not reflected when I run bin/rails c until I run bin/spring stop:
$ bin/spring status
Spring is running:
99244 spring server | yogurt | started 27 mins ago
99572 spring app | yogurt | started 18 mins ago | development mode
# ... add a `puts 'hi'` inside the configure block in
# `config/environments/development.rb`
$ bin/spring status
Spring is running:
99244 spring server | yogurt | started 29 mins ago
120 spring app | yogurt | started 1 sec ago | development mode
# ^^^ restarted
$ bin/rails c
Running via Spring preloader in process 137
Loading development environment (Rails 4.2.7.1)
[1] pry(main)> exit # no "hi" outputted
$ bin/spring stop
Spring stopped.
agis:yogurt [yml-config_for] $ bin/rails c
hi # <---- change is picked up now
Running via Spring preloader in process 151
Loading development environment (Rails 4.2.7.1)
[1] pry(main)>
The same goes for config/application.rb. We're on Rails 4.2.7.1 and spring 1.7.2.
I assume this is not the expected behavior.
Thanks in advance.
Can you please provide a sample application that reproduces the error?