require "spring/commands" after boot_server #460
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is PR
require "spring/commands"
calls afterboot_server
, but calls beforerun_command
.Related to #458, #453, #456
Environments
I experimented this environments.
ruby-2.2.3
spring
spring-1.6.0
spring-1.6.1
bundler
bundler-1.11.0
bundler-1.11.2
Problem
Use
spring-1.6.x
andbundler-1.11.x
combination, spring command failed with follow error.I think, there is same issue #458, #453, #456
Reason
There is related two reason, this problem is complicative.
The one is that
Bundler.with_clean_env
problem refs with_clean_env does not replace original RUBYLIB environmental variable · Issue #3982 · bundler/bundler.The two is that
Spring::Client::Run#boot_server
receiveGEM_PATH
env, but ifrequire "bundler/setup"
overridesGem.path
,Spring::Client::Run#boot_server
receives overrided env. Therefore child process does not foundbundler/setup
.Summary is follow this.
bundler-1.10.x
spring-1.5.0
RUBYLIB
does not replace inBundler.with_clean_env
, therefore successesrequire "bundler/setup"
spring-1.6.x
RUBYLIB
does not replace inBundler.with_clean_env
, therefore successesrequire "bundler/setup"
bundler-1.11.x
spring-1.5.0
RUBYLIB
replaced inBundler.with_clean_env
, BUTGem.path
does not overrideGem.path
because does not existrequire "spring/commands"
, therefore successesrequire "bundler/setup"
spring-1.6.x
RUBYLIB
replaced inBundler.with_clean_env
, ANDGem.path
overridesGem.path
because existrequire "spring/commands"
, therefore failed torequire "bundler/setup"
Feedback
What do you think this conclusion? Please let me any feedbacks.