5
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 3 years have passed since last update.

$ rails generate 実行時、rubyのCPU使用率が100%になる

Last updated at Posted at 2021-06-09

原因

どうやらlisten gemがBigSurをサポートしていないというバグが原因らしい。
Pegging CPU core on Apple M1 processor #636

解決策

Gemfileのlisten gemのバージョンを3.3.0以降のものに指定すればよい。

Gemfile
group :development do
  gem 'web-console',           '4.0.1'
  gem 'listen',                '>=3.0.5', '<4.0'
  gem 'spring',                '2.1.0'
  gem 'spring-watcher-listen', '2.0.1'
end

追記

↓teratailのこちらの記事のやり方でも良さそうです。
railsのspringが暴走し、rubyがCUPを大きく消費する

5
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
5
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?