From c5b5d555f719912db025d7471801221e53572908 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Wed, 15 Apr 2015 13:55:13 +1000 Subject: [PATCH] Lock the version of the spawned server. This fixes a bug when the currently-executing version of Spring is not the most recent version available in the gem path. Previously, this would launch the most recent server version and cause an error when Bundler detects the mismatch. Fixes #295. --- CHANGELOG.md | 2 ++ lib/spring/client/run.rb | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ae8f946..806a3dc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## 1.3.5 * Fix `rails test` command to run in test environment #403 - @eileencodes +* Ensure the spawned server is loaded from the same version of the Spring gem + as the client. Issue #295. ## 1.3.4 diff --git a/lib/spring/client/run.rb b/lib/spring/client/run.rb index ce9d258a..4a7c213f 100644 --- a/lib/spring/client/run.rb +++ b/lib/spring/client/run.rb @@ -68,8 +68,7 @@ def boot_server pid = Process.spawn( gem_env, "ruby", - "-r", "spring/server", - "-e", "Spring::Server.boot" + "-e", "gem 'spring', '#{Spring::VERSION}'; require 'spring/server'; Spring::Server.boot" ) until env.socket_path.exist?