前提・実現したいこと
Ruby on railsを使えるようにしたいです。
ドットインストールのRuby on Rails 5入門 #2 を参考にRuby on railsの動作確認を行なっている中で、エラーが発生してしまいます。エラーを解決する方法をご教示いただきたいです。
発生している問題・エラーメッセージ
[vagrant@localhost myapp]$ rails -v
Could not find gem 'sqlite3 (~> 1.3.6)' in any of the gem sources listed in your Gemfile.
Run bundle install
to install missing gems.
ここで 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.5
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 bindex 0.8.1
Using msgpack 1.3.3
Using bootsnap 1.4.6
Using bundler 1.17.2
Using byebug 11.1.3
Using regexp_parser 1.7.0
Using xpath 3.2.0
Using capybara 3.32.2
Using childprocess 3.0.0
Using ffi 1.13.0
Using jbuilder 2.10.0
Using rb-fsevent 0.10.4
Using rb-inotify 0.10.1
Using listen 3.2.1
Using method_source 1.0.0
Using puma 4.3.5
Using rack-proxy 0.6.5
Using thor 1.0.1
Using railties 6.0.3.1
Using sprockets 4.0.0
Using sprockets-rails 3.2.1
Using rails 6.0.3.1
Using rubyzip 2.3.0
Fetching sassc 2.4.0
Installing sassc 2.4.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.4.0/ext
/home/vagrant/.rbenv/versions/2.6.5/bin/ruby -I /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/2.6.0 -r
./siteconf20200530-9464-11ofa1d.rb extconf.rb
creating Makefile
current directory: /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.4.0/ext
make "DESTDIR=" clean
current directory: /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.4.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.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.4.0
for inspection.
Results logged to
/home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/sassc-2.4.0/gem_make.out
An error occurred while installing sassc (2.4.0), and Bundler cannot continue.
Make sure that gem install sassc -v '2.4.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
上記のgem install sash -v'2.4.0'を行うと下記のようにエラーが発生してしまいます。
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.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.4.0/ext
/home/vagrant/.rbenv/versions/2.6.5/bin/ruby -I /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/2.6.0 -r ./siteconf20200530-9863-gu13v3.rb extconf.rb
creating Makefile
current directory: /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.4.0/ext
make "DESTDIR=" clean
current directory: /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.4.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.6.5/lib/ruby/gems/2.6.0/gems/sassc-2.4.0 for inspection.
Results logged to /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/sassc-2.4.0/gem_make.out
**Failed to build gem native extension.**とあるので、gem native extensionをビルドしないビルドしないといけないかと思い、インターネットで検索してますが、知識が乏しく、解決できておりません。
三日ほど調べてますが、分からず苦しんでおります。
どなたかわかる方ご教示願います。
エラーメッセージ
### 該当のソースコード ```ここに言語名を入力 ソースコード
試したこと
補足情報(FW/ツールのバージョンなど)
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。