rails / sass-rails

Ruby on Rails stylesheet engine for Sass

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bundle failed with gem 'sass-rails', '>= 6'

KKSun opened this issue · comments

commented

Hi, I'm using macOS 10.15, just installed ruby with rbenv. I tried to start a project with rails, but when I initiate the project, the following error message appears.

I comment out gem 'sass-rails', '>= 6' in the Gemfile and run bundle, everything goes fine.

Could anyone tell me what goes wrong with me here??

Installing sassc 2.3.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/sunhlf/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sassc-2.3.0/ext
/Users/sunhlf/.rbenv/versions/2.7.1/bin/ruby -I /Users/sunhlf/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0 -r
./siteconf20200509-10431-gdkl2g.rb extconf.rb
creating Makefile

current directory: /Users/sunhlf/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sassc-2.3.0/ext
make "DESTDIR=" clean

current directory: /Users/sunhlf/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sassc-2.3.0/ext
make "DESTDIR="
compiling ./libsass/src/ast.cpp
In file included from ./libsass/src/ast.cpp:3:
./libsass/src/sass.hpp:55:10: fatal error: 'string' file not found
#include <string>
         ^~~~~~~~
1 error generated.
make: *** [ast.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/sunhlf/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sassc-2.3.0 for inspection.
Results logged to
/Users/sunhlf/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-19/2.7.0/sassc-2.3.0/gem_make.out

An error occurred while installing sassc (2.3.0), and Bundler cannot continue.
Make sure that `gem install sassc -v '2.3.0' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  sass-rails was resolved to 6.0.0, which depends on
    sassc-rails was resolved to 2.1.2, which depends on
      sassc