Skip to content

spring binstub modifier does not check for class presenceΒ #695

@jjb

Description

@jjb

thanks for a great project!

The docs say this command bundle exec spring binstub --all should produce this:

begin
  load File.expand_path('../spring', __FILE__)
...

But that's not what i'm seeing in my rails 6.1 app

it simply produced this in bin/rails and bin/rake

 #!/usr/bin/env ruby
+load File.expand_path("spring", __dir__)

it does also generate bin/spring which has some checking logic, so maybe that's the expected behavior and the readme just needs to be updated

if !defined?(Spring)
......

i'm noticing this because i'm running into the problem where

  1. i have spring in development in Gemfile
  2. running something like RAILS_ENV=test rails db:migrate still gives me the Please, set config.cache_classes to false in config/environments/test.rb message

so i'm not sure what is the correct way to not use spring in my local test environment (i think something is happening like, the gem gets installed locally, isn't in the bundle, but the binstub is loading it outside of the logic of bundler?)

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