Below is the exact message returned from terminal:
ERROR: Error installing sass: ERROR failed to build gem native extension. current directory: /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.18/ext/ffi_c /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20170721-3751-3vsh43.rb extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.18 for inspection. Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-16/2.0.0/ffi-1.9.18/gem_make.out
I tried both options, including gem install sass
and sudo gem install sass
. @Carnaru Valentin said to try sudo apt-get install ruby2.1-dev build-essential
. When I tried this, terminal returned sudo: apt-get: command not found
. I am running macOS. Anyone know how to solve this issue?
The “-v” command checks the version of SASS you have installed. If you don't have it installed, it will come back as not installed.
You can install Sass on Windows, Mac, or Linux by downloading the package for your operating system from GitHub and adding it to your PATH . That's all—there are no external dependencies and nothing else you need to install.
It happens because you don't have Xcode Command Line developer tool on your OSX. For Sass, Compass and NPM, you need to have Xcode on your Mac OSX.
Install it by this command: xcode-select --install
. You can also install it through App Store. It usually takes time to download and Install Xcode.
After installation is finished you must use sudo xcodebuild -license
command to accept Xcode License agreement. Once you accept it, you can install your Sass with sudo gem install sass
command easily.
First
you should download the last version of Ruby Ruby Last Version because rubygems.org updated their SSL certificate and older versions don't have the updated certificate bundled for more information about this check this link
rubygem SSL certificate
second
After you install last version of Ruby , open cmd and write this command gem install sass
if you have an error like this
you must run this command chcp 65001
chcp is shortcut for Change the active console This command is rarely required as most GUI programs and PowerShell now support Unicode for more information check this link
After run this command,write command of install sass again gem install sass
congratulation sass installed succussfully
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With