Apple Silicon Ruby on Rails Crash / SegFault – Sassc

Apple Silicon Ruby on Rails Crash / SegFault – Sassc
Photo by Mohamed Nohassi / Unsplash

If you recently upgrade from Macbook Intel to Macbooks with an M1 processor and your project may expect some issues.

installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/sassc-2.4.0/lib/sassc/engine.rb:43: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [arm64-darwin21]
-- Control frame information -----------------------------------------------
c:0048 p:---- s:0342 e:000341 CFUNC  :compile_data_context

Insert this code on config/application.rb

Rails.application.config.assets.configure do |env|
  env.export_concurrent = false
end

ref: https://github.com/sass/sassc-ruby/issues/197

This repo on GH contains some fixes about problems with m1