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.3springspring-1.6.0spring-1.6.1bundlerbundler-1.11.0bundler-1.11.2Problem
Use
spring-1.6.xandbundler-1.11.xcombination, 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_envproblem refs with_clean_env does not replace original RUBYLIB environmental variable · Issue #3982 · bundler/bundler.The two is that
Spring::Client::Run#boot_serverreceiveGEM_PATHenv, but ifrequire "bundler/setup"overridesGem.path,Spring::Client::Run#boot_serverreceives overrided env. Therefore child process does not foundbundler/setup.Summary is follow this.
bundler-1.10.xspring-1.5.0RUBYLIBdoes not replace inBundler.with_clean_env, therefore successesrequire "bundler/setup"spring-1.6.xRUBYLIBdoes not replace inBundler.with_clean_env, therefore successesrequire "bundler/setup"bundler-1.11.xspring-1.5.0RUBYLIBreplaced inBundler.with_clean_env, BUTGem.pathdoes not overrideGem.pathbecause does not existrequire "spring/commands", therefore successesrequire "bundler/setup"spring-1.6.xRUBYLIBreplaced inBundler.with_clean_env, ANDGem.pathoverridesGem.pathbecause existrequire "spring/commands", therefore failed torequire "bundler/setup"Feedback
What do you think this conclusion? Please let me any feedbacks.