title: Why do I have to run "bundle exec spring" when I have a bin/spring binstub?
body: <p>When running <code>spring</code> directly (without <code>bundle exec</code>) from the command line, nothing happens! Only when running <code>bundle exec spring</code>, it works:</p>
  
  <pre><code>$ spring status
  $ bundle exec spring status
  Spring is running:
  
  21990 spring server | synaesthesia | started 1 min ago 
  22046 spring app    | synaesthesia | started 43 secs ago | test mode    
  </code></pre>
  
  <p>My <code>bin/spring</code> binstub looks like this:</p>
  
  <pre><code>#!/usr/bin/env ruby
  
  # This file loads spring without using Bundler, in order to be fast
  # It gets overwritten when you run the `spring binstub` command
  
  unless defined?(Spring)
    require "rubygems"
    require "bundler"
  
    if match = Bundler.default_lockfile.read.match(/^GEM$.*?^    spring \((.*?)\)$.*?^$/m)
      ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
      ENV["GEM_HOME"] = ""
      Gem.paths = ENV
  
      gem "spring", match[1]
      require "spring/binstub"
    end
  end
  </code></pre>
  
  <p>It has been patched by spring doing a <code>bundle exec spring binstub --all</code>. So I guess everything's configured correct? So why do I need a <code>bundle exec</code> all the time?</p>
  
  <p>I'm using Rails 4.0.4.</p>