spring
spring copied to clipboard
`rails` command is not using spring, even when instrumented (`rake` does)
Possibly related to https://github.com/rails/spring/issues/544.
The rake command is leveraging spring, but the rails command does not.
2.5.0:rails-5.2 % spring stop
Spring stopped.
2.5.0:rails-5.2 % ./bin/rails routes
Prefix Verb URI Pattern Controller#Action
root GET / pages#root
2.5.0:rails-5.2 % ./bin/rake routes
Running via Spring preloader in process 42529
Prefix Verb URI Pattern Controller#Action
root GET / pages#root
2.5.0:rails-5.2 % ./bin/rails routes
Prefix Verb URI Pattern Controller#Action
root GET / pages#root
Checking out bin/rails shows that it's instrumented for spring...
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
But for some reason, spring isn't triggered.
I think this is a duplicate of #485. This apparently has been a problem ever since Rails 5.0 was introduced. 😞