On develop, the Spring preloader is now installed and enabled for
development installations and replaces Spork for running Rails consoles
and tests quickly.
What you need to know:
-
Running
bin/rake test test/unit/example_test.rb
,bin/rails c
and
similar commands will automatically start and use Spring. Note the bin/
prefix! -
Spring runs background processes to speed up commands: use
spring status
to see them andspring stop
to stop (i.e. restart) them. They
should automatically restart when required, but improve config/spring.rb
if necessary.
Other useful information:
-
bin/rake test test/unit/example_test.rb
will also run all installed
plugin tests, which will be fixed under ticket #15763. -
export DISABLE_SPRING=true
if you don't want to use it at all. -
Install "direnv" (https://github.com/direnv/direnv/#install),
echo PATH_add bin > .envrc
in Foreman's dir, and it will automatically add
./bin/ to your PATH so you can use rails/rake without the bin/ prefix.
direnv is in most distros, but Fedora packages are at
https://copr.fedorainfracloud.org/coprs/domcleal/direnv/. -
https://github.com/rails/spring#readme has lots of useful info.