LoginSignup
45
47

More than 5 years have passed since last update.

【Ruby on Rails】springを再起動する

Last updated at Posted at 2017-07-03

springとは

今回はspring再起動の方法の紹介がメインなため詳細については割愛します。Railsアプリケーションのプリローダー
開発中に何度も実行するようなrailsなどのコマンドを素早く実行することができるようになる。

再起動する

初めに、springが起動しているのを確認する。

lime:sample_app residenti$ bin/spring status
Spring is running:

25683 spring server | sample_app | started 26 mins ago
25684 spring app    | sample_app | started 26 mins ago | development mode

次に、springを停止する。
念のため、ちゃんと止まっているのかを確認。

lime:sample_app residenti$ bin/spring stop
Spring stopped.

lime:sample_app residenti$ bin/spring status
Spring is not running.

最後に、springを起動し、動いていることが確認できればOK。

lime:sample_app residenti$ bundle exec rails c
Running via Spring preloader in process 26080
Loading development environment (Rails 5.0.3)
Cannot read termcap database;
using dumb terminal settings.
irb(main):001:0> exit

lime:sample_app residenti$ bin/spring status
Spring is running:

26067 spring server | sample_app | started 14 secs ago
26068 spring app    | sample_app | started 14 secs ago | development mode
45
47
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
45
47