Turbo mode makes reloading code fast and easy.
- To reload, Ctrl+\ (or kill -SIGQUIT child_pid)
- Note that 'exit' doesn't quite work at the moment. Use Ctrl+C to exit.
- To see the list of files that aren't reloadable: puts $SHARED_FEATURES.sort
- TURBO_MODE=true script/console
- Files loaded before route initialization won't be reloadable: (e.g. Gemfile, initializers, and any app files referenced during startup)
- Files not yet loaded will be reloadable (most models, views, and controllers)
# a bunch of code that won't be reloadable TurboMode.enable! do # after_fork hooks: # ActiveRecord::Base.clear_all_connections! end # a bunch of code that will be reloadable
- ENV['TURBO_SIGNAL'] - The signal used to request reloads. e.g. TURBO_SIGNAL=HUP
Things it breaks
- SIGQUIT is captured. This breaks the exit method, but provides the reload shortcut Ctrl+\
- Let's find out.