Skip to content

Commit

Permalink
Bump sassc and fix LoadErrors
Browse files Browse the repository at this point in the history
There seems to be a portability issue in the sassc gem that attempts to execute illegal instruction which subsequently manifest themselves as Ruby LoadErrors. The workaround for this problem is to uninstall the gem (if already installed) and then reinstall it without tuning the native extension code for the CPU architecture. This leads to marginally less efficient code, however this is acceptable since libsass is only used when precompiling assets.

More information is available at the following GitHub issue page for the sassc gem:
sass/sassc-ruby#146
  • Loading branch information
CHTJonas committed Oct 12, 2019
1 parent fe63b8c commit 2edf79a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 6 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ ruby '2.6.3'
# Application config
gem 'dotenv-rails', '~> 2.7', require: 'dotenv/rails-now'

# Pin version of sassc because there seems to be a bug on macOS
gem 'sassc', '= 2.0.1'
# A portability issue in the sassc gem exists on several platforms.
# If this causes you issues (LoadErrors) then run the following commands:
# 1) gem uninstall sassc
# 2) gem install sassc -- --disable-march-tune-native
# 3) bundle install
gem 'sassc', '~> 2.2'

# Rails
gem 'rails', '~> 6.0.0'
Expand Down
5 changes: 2 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,8 @@ GEM
rubyzip (2.0.0)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.0.1)
sassc (2.2.1)
ffi (~> 1.9)
rake
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
Expand Down Expand Up @@ -540,7 +539,7 @@ DEPENDENCIES
rotp (~> 5.1)
rqrcode (~> 1.1.1)
sass-rails (~> 6.0)
sassc (= 2.0.1)
sassc (~> 2.2)
secure_headers (~> 6.1)
selenium-webdriver (~> 3.142)
sentry-raven (~> 2.11)
Expand Down

0 comments on commit 2edf79a

Please sign in to comment.