0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[memo] Spring install

Last updated at Posted at 2018-03-07

Spring install

Gemfile
group :development, :test do
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
  gem 'spring-commands-rspec'
end
$ bundle install
$ bundle exec spring binstub --all
* bin/rake: spring inserted
* bin/rails: spring inserted

bin/rake bin/rails が更新され、新たにbin/springが作成される。

Spring起動

現在のSpringの状態を確認、初期状態ではSpringは起動していない。

$ bundle exec spring status
Spring is not running.

rails consoleを起動させるとSpringが自動的に起動する。

$ rails c
Running via Spring preloader in process 6833
Loading development environment (Rails 5.1.5)
[1] pry(main)>

改めてSpringの状態を確認、起動していることが確認できる。

$ bundle exec spring status
Spring is running:

次回以降のrails consoleの起動が早くなる。
railsの他、rake rspecも同様に高速化される。

以上

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?