前提・実現したいこと
gem 'sorcery' gem 'haml-rails' gem 'bootstrap-sass'
をbundle installしたい
発生している問題・エラーメッセージ
gem fileに上記gemを記載後$bundle installを実行したところ
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.
と出てきたため、
$gem install sassc -v '2.3.0' --source 'https://rubygems.org/'
を実行しました。
その結果、さらに
cc1plus: error: unrecognized command line option "-std=c++11"
と出てきたため
[root@localhost ~]#yum install centos-release-scl-rh #yum install devtoolset-8 #scl enable devtoolset-8 bash
を実行し、その後gem install sassc -v '2.3.0' --source 'https://rubygems.org/'
を実行したのですが、yum install前と同じエラーが出てしまいました。
抽象度高くなってしまい、大変恐縮ですが、解決策を教えていただきたいです。
該当のソースコード
[vagrant@localhost tsubuyaki]$ bundle install The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. Fetching gem metadata from https://rubygems.org/............ Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Using rake 13.0.1 Using concurrent-ruby 1.1.6 Using i18n 1.8.2 Using minitest 5.14.1 Using thread_safe 0.3.6 Using tzinfo 1.2.7 Using zeitwerk 2.3.0 Using activesupport 6.0.3.1 Using builder 3.2.4 Using erubi 1.9.0 Using mini_portile2 2.4.0 Using nokogiri 1.10.9 Using rails-dom-testing 2.0.3 Using crass 1.0.6 Using loofah 2.5.0 Using rails-html-sanitizer 1.3.0 Using actionview 6.0.3.1 Using rack 2.2.2 Using rack-test 1.1.0 Using actionpack 6.0.3.1 Using nio4r 2.5.2 Using websocket-extensions 0.1.4 Using websocket-driver 0.7.2 Using actioncable 6.0.3.1 Using globalid 0.4.2 Using activejob 6.0.3.1 Using activemodel 6.0.3.1 Using activerecord 6.0.3.1 Using mimemagic 0.3.5 Using marcel 0.3.3 Using activestorage 6.0.3.1 Using mini_mime 1.0.2 Using mail 2.7.1 Using actionmailbox 6.0.3.1 Using actionmailer 6.0.3.1 Using actiontext 6.0.3.1 Using public_suffix 4.0.5 Using addressable 2.7.0 Using execjs 2.7.0 Using autoprefixer-rails 9.7.6 Using bcrypt 3.1.13 Using bindex 0.8.1 Using msgpack 1.3.3 Using bootsnap 1.4.6 Using ffi 1.13.0 Fetching sassc 2.3.0 Installing sassc 2.3.0 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sassc-2.3.0/ext /home/vagrant/.rbenv/versions/2.7.1/bin/ruby -I /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/2.7.0 -r ./siteconf20200602-16094-4yyty6.rb extconf.rb creating Makefile current directory: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sassc-2.3.0/ext make "DESTDIR=" clean current directory: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sassc-2.3.0/ext make "DESTDIR=" compiling ./libsass/src/ast.cpp cc1plus: error: unrecognized command line option "-std=c++11" make: *** [ast.o] エラー 1 make failed, exit code 2 Gem files will remain installed in /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sassc-2.3.0 for inspection. Results logged to /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/extensions/x86_64-linux/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: bootstrap-sass was resolved to 3.4.1, which depends on sassc
$gem install sassc -v '2.3.0' --source 'https://rubygems.org/ 実行後
[vagrant@localhost tsubuyaki]$ gem install sassc -v '2.3.0' --source 'https://rubygems.org/' Building native extensions. This could take a while... ERROR: Error installing sassc: ERROR: Failed to build gem native extension. current directory: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sassc-2.3.0/ext /home/vagrant/.rbenv/versions/2.7.1/bin/ruby -I /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/2.7.0 -r ./siteconf20200602-16203-ytjig2.rb extconf.rb creating Makefile current directory: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sassc-2.3.0/ext make "DESTDIR=" clean current directory: /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sassc-2.3.0/ext make "DESTDIR=" compiling ./libsass/src/ast.cpp cc1plus: error: unrecognized command line option "-std=c++11" make: *** [ast.o] エラー 1 make failed, exit code 2 Gem files will remain installed in /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sassc-2.3.0 for inspection. Results logged to /home/vagrant/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/extensions/x86_64-linux/2.7.0/sassc-2.3.0/gem_make.out
試したこと
#yum update
[root@localhost ~]#yum install centos-release-scl-rh #yum install devtoolset-8 #scl enable devtoolset-8 bash
補足情報(FW/ツールのバージョンなど)
CentOS:6.10 (Final)
ここにより詳細な情報を記載してください。
あなたの回答
tips
プレビュー