Skip to content

Commit c5b5d55

Browse files
committed
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.
1 parent bda1c66 commit c5b5d55

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## 1.3.5
22

33
* Fix `rails test` command to run in test environment #403 - @eileencodes
4+
* Ensure the spawned server is loaded from the same version of the Spring gem
5+
as the client. Issue #295.
46

57
## 1.3.4
68

lib/spring/client/run.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ def boot_server
6868
pid = Process.spawn(
6969
gem_env,
7070
"ruby",
71-
"-r", "spring/server",
72-
"-e", "Spring::Server.boot"
71+
"-e", "gem 'spring', '#{Spring::VERSION}'; require 'spring/server'; Spring::Server.boot"
7372
)
7473

7574
until env.socket_path.exist?

0 commit comments

Comments
 (0)