Using the Spring preloader in develop

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:

  1. 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!

  2. Spring runs background processes to speed up commands: use spring status to see them and spring stop to stop (i.e. restart) them. They
    should automatically restart when required, but improve config/spring.rb
    if necessary.

Other useful information:

  1. bin/rake test test/unit/example_test.rb will also run all installed
    plugin tests, which will be fixed under ticket #15763.

  2. export DISABLE_SPRING=true if you don't want to use it at all.

  3. 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/.

  4. https://github.com/rails/spring#readme has lots of useful info.

ยทยทยท -- Dominic Cleal dominic@cleal.org