spring
spring copied to clipboard
Spring taking minutes to run on MacOS with M1 Chip
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
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.
having similar issues, but could not debug it further.
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
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.
Yep, CPU issue is resolved by upgrading listen
. @yv3s if that fixes things for you, do you want to close this out?
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 oflisten
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'