LoginSignup
5

More than 5 years have passed since last update.

【rails5】Ruby Sass is deprecated and will be unmaintained as of 26 March 2019. というメッセージ

Last updated at Posted at 2019-01-30

Ruby Sass is deprecated and will be unmaintained as of 26 March 2019. というメッセージが出た。

AWScloud9で新しくワークスペースを作り、railsアプリ作成後、bundle installすると以下のメッセージ。

Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.

* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
primary implementation: https://sass-lang.com/install

* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
sassc gem: https://github.com/sass/sassc-ruby#readme

* For more details, please refer to the Sass blog:
http://sass.logdown.com/posts/7081811

rubyのsassがサポート終了するのでsasscにして下さい、とのことで変更したのでメモ。

以下の記事を参考にしました。
https://qiita.com/cymbiformis/items/a965d9bfef536edf41a2

sasscはsassをcやc++言語で実装したライブラリ、sassよりも高速でコンパイルが出来るとのこと。

①gem 'sassc-rails'に変える。

②GemfileとGemfile.lock内の、ファイル名がsassとなってるもの全て削除する。

Gemfile

#gem 'sass-rails',   '5.0.6'

gem 'sassc-rails'
Gemfile.lock

ファイル名がsassとなっているものを全て削除

その後、
gem uninstall sass-rails

bundle install

sasscがインストール出来ているかどうか確認する。

1つsassが残っていたので、rails sでエラーが出ました。

削除して、再度bundle installでインストール出来、正常に動作しました。

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