diff --git a/README.md b/README.md index a922564b..472c7f74 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ code into relevant existing executables. The snippet looks like this: ``` ruby begin - load File.expand_path("../spring", __FILE__) + load File.expand_path('../spring', __FILE__) rescue LoadError end ``` @@ -295,7 +295,7 @@ settings. Note that `~/.spring.rb` is loaded *before* bundler, but projects without having to be added to the project's Gemfile, require them in your `~/.spring.rb`. -`config/spring_client.rb` is also loaded before bundler and before a +`config/spring_client.rb` is also loaded before bundler and before a server process is started, it can be used to add new top-level commands. ### Application root diff --git a/lib/spring/client/binstub.rb b/lib/spring/client/binstub.rb index 98de19fe..edc13aa1 100644 --- a/lib/spring/client/binstub.rb +++ b/lib/spring/client/binstub.rb @@ -13,7 +13,7 @@ class Binstub < Command # should cause the "unsprung" version of the command to run. LOADER = < [Bundler.bundle_path.to_s, *Gem.path].uniq } - gem "spring", match[1] - require "spring/binstub" + Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq } + gem 'spring', match[1] + require 'spring/binstub' end end CODE