Spring は、Rails 4.1 で標準となったプレローダで、rails
rake
コマンドを早くすることができます。
rails new
した初期状態で、次のように Gemfile
に記載されています。
ただ、bundle install
して gem はインストールされていても、そのままだと rails
rake
コマンドに Spring が適用されていません。ですので、使う場合は次のようにします。
$ bundle exec spring binstub --all
すると、bin/spring
が生成されると共に、bin/rails
bin/rake
が次のように上書きされます。
あとは普通に ./bin/rails
や ./bin/rake
コマンドの実行時に自動で Spring が適用されているので、意識せず Spring の恩恵を受けることができます^^
ほか
自社のブログにも投稿しました。