spring icon indicating copy to clipboard operation
spring copied to clipboard

Spring taking minutes to run on MacOS with M1 Chip

Open yv3s opened this issue 4 years ago • 6 comments

Hi folks,

Just got the new Macbook Pro with the Apple M1 Chip. Reinstalled everything as usual through the terminal on Rosetta to avoid issues ! Everything works perfectly except my Rails Console. Everytime I launch it it takes literally minutes to start. After the first start, I can exit and relaunch within a sec, but the first start is always a pain.

My first guess is that it has something to do with Spring and Rosetta.

When I check on the spring server it gets stuck on

[2020-12-08 17:56:18 +0100] [60586] [application:development] preloading app

Any other similar experience ?

Best

yv3s avatar Dec 08 '20 16:12 yv3s

Working over here – running Ruby 2.7.1 and Rails 6.0.3.2. I am noticing Spring pegging a CPU core or two so am having to disable it.

henryaj avatar Dec 10 '20 23:12 henryaj

having similar issues, but could not debug it further.

bumi avatar Feb 17 '21 16:02 bumi

Same here, spring burns three cpus on apple mac m1.

=> Booting Puma
=> Rails 6.0.3.2 application starting in development 
=> Run `rails server --help` for more startup options
Puma starting in single mode...
* Puma version: 5.2.2 (ruby 2.7.2-p137) ("Fettisdagsbulle")
*  Min threads: 5
*  Max threads: 5
*  Environment: development
*          PID: 76293
* Listening on http://127.0.0.1:3000
* Listening on http://[::1]:3000

Bildschirmfoto 2021-03-19 um 14 35 37

nhh avatar Mar 19 '21 13:03 nhh

I was having a similar issue and my problem was that we were using spring-watcher-listen as suggested on https://github.com/rails/spring#watching-files-and-directories but our version of listen was outdated.

I suggest you guys take a look at that and upgrade listen to at least v3.3.0 (https://github.com/guard/listen/releases/tag/v3.3.0) as it includes a change to support Big Sur https://github.com/guard/listen/pull/479.

diego-silva avatar Mar 24 '21 19:03 diego-silva

Yep, CPU issue is resolved by upgrading listen. @yv3s if that fixes things for you, do you want to close this out?

henryaj avatar Mar 26 '21 09:03 henryaj

I was having a similar issue and my problem was that we were using spring-watcher-listen as suggested on https://github.com/rails/spring#watching-files-and-directories but our version of listen was outdated.

I suggest you guys take a look at that and upgrade listen to at least v3.3.0 (https://github.com/guard/listen/releases/tag/v3.3.0) as it includes a change to support Big Sur guard/listen#479.

spring-watcher-listen doesn't currently have a release that can handle spring 3.0 but you can access a version that does but putting this in your gemfile gem 'spring-watcher-listen', github: 'timdorr/spring-watcher-listen'

StephenVNelson avatar Dec 04 '21 03:12 StephenVNelson