2

springコマンドラインから( なしで) 直接実行するbundle execと、何も起こりません! を実行bundle exec springしている場合にのみ機能します。

$ 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    

私のbin/springbinstubは次のようになります。

#!/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

春にパッチが適用されましたbundle exec spring binstub --all. それで、すべてが正しく構成されていると思いますか?では、なぜbundle exec常に が必要なのですか?

Rails 4.0.4 を使用しています。

4

1 に答える 1