Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing Sass (Ruby 2.5.0.1, MSYS2 20161025.0.0)

I tried to install Sass. I installed Ruby and MSYS2 prior to that, the latest from all with Chocolatey:

choco install ruby
choco install msys2

Seemingly they were properly installed. ruby -v results in:

ruby 2.5.0p0 (2017-12-25 revision 61468) [x64-mingw32]

When I tried to run gem install sass I received the following error message:

ERROR:  Error installing sass:
        The last version of ffi (< 2, >= 0.5.0) to support your Ruby & RubyGems was 1.9.18. Try installing it with `gem install ffi -v 1.9.18` and then running the current command again
        ffi requires Ruby version < 2.5, >= 2.0. The current ruby version is 2.5.0.

Ok, so I attempted to run gem install ffi -v 1.9.18.

I received this error message:

ERROR:  Error installing ffi:
        The last version of ffi (= 1.9.18) to support your Ruby & RubyGems was 1.9.18. Try installing it with `gem install ffi -v 1.9.18`
        ffi requires Ruby version < 2.5, >= 2.0. The current ruby version is 2.5.0.

I tried to reinstall Ruby with proper installer, restarted computer, but the same error appears.

How can I make Sass to get installed?

like image 558
Erik Kránicz Avatar asked Jan 07 '18 22:01

Erik Kránicz


1 Answers

To install the Ruby version before 2.5 (as mentioned in the comments):

choco install ruby --version 2.4.3.1
like image 160
mfras3r Avatar answered Oct 30 '22 22:10

mfras3r