Skip to content

rails command is not using spring, even when instrumented (rake does) #553

@christiannelson

Description

@christiannelson

Possibly related to #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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions