0
votes
gem install sass

But, I get this error.

Fetching: rb-fsevent-0.10.2.gem (100%)

Successfully installed rb-fsevent-0.10.2 Fetching: ffi-1.9.18.gem (100%) Building native extensions. This could take a while... /usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:76: warning: Insecure world writable dir /opt in PATH, mode 040777 ERROR: Error installing sass: ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.18/ext/ffi_c

/usr/bin/ruby2.3 -r ./siteconf20171018-24304-17ddhmp.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/ffi-1.9.18 for inspection. Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.18/gem_make.out

what's wrong here? i installed Ruby stable release Ruby 2.4.2 Ruby stable release Ruby 2.4.2

1

1 Answers

0
votes

These kinds of errors are usually system compiler errors where your system might not have the correct core c libraries installed. Have a look at this thread for ideas on how you might fix this.

https://github.com/sass/sass/issues/2357

How is Ruby installed? RVM, RBENV, Type this in terminal and give us outputs:

which ruby
ruby -v

Also did you try running sudo gem install sass ?

UPDATE: You may need root access to where the gem is trying to install. See warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777

Also can you post output of echo $PATH ? and also ruby -v and which ruby Hard to see what's going on without that.

I would also recommend you use RVM to install ruby. Not sure if you your linux version comes with pre-installed ruby version, but you can install other Ruby versions with RVM.