前提・実現したいこと
発生している問題・エラーメッセージ
An error occurred while installing mini_racer (0.4.0), and Bundler cannot continue. Make sure that `gem install mini_racer -v '0.4.0' --source 'https://rubygems.org/'` succeeds before bundling.
試したこと
vi Gemfileで
gem 'mini_racer', '~> 0.4.0'
と編集しました。
補足情報(FW/ツールのバージョンなど)
centos7
ruby 2.6.7
Rails 6.1.3.1
エラーメッセージに書かれている、「gem install mini_racer -v '0.4.0' --source
'https://rubygems.org/'」だけでの実行は行ってみましたか?
試してみましたが変わらずでした、、
em install mini_racer -v '0.4.0' --source
'https://rubygems.org/
こちら入力したところ、
ERROR: Error installing mini_racer:
ERROR: Failed to build gem native extension.
と表示されインストールできてないみたいです。。
> ERROR: Failed to build gem native extension.
以降にさらにメッセージは出ていませんか?
ERROR: Error installing mini_racer:
ERROR: Failed to build gem native extension.
current directory: /home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/mini_racer-0.4.0/ext/mini_racer_extension
/home/vagrant/.rbenv/versions/2.6.7/bin/ruby -I /home/vagrant/.rbenv/versions/2.6.7/lib/ruby/2.6.0 -r ./siteconf20210418-4993-ai0kkz.rb extconf.rb
checking for -lpthread... yes
creating Makefile
current directory: /home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/mini_racer-0.4.0/ext/mini_racer_extension
make "DESTDIR=" clean
current directory: /home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/mini_racer-0.4.0/ext/mini_racer_extension
make "DESTDIR="
compiling mini_racer_extension.cc
cc1plus: 警告: コマンドラインオプション ‘-Wimplicit-int’ は C/ObjC 用としては有効ですが、C++ 用としては有効ではありません [デフォルトで有効]
In file included from /home/vagrant/.rbenv/versions/2.6.7/include/ruby-2.6.0/ruby/ruby.h:29:0,
from /home/vagrant/.rbenv/versions/2.6.7/include/ruby-2.6.0/ruby.h:33,
from mini_racer_extension.cc:2:
/home/vagrant/.rbenv/versions/2.6.7/include/ruby-2.6.0/ruby/defines.h:388:44: 警告: リテラルの接尾辞が無効です。C++11 では、リテラルと識別子の間にスペースを入れる必要があります。 [-Wliteral-suffix]
# define EXTERN __pragma(message(__FILE__"("STRINGIZE(__LINE__)"): warning: "\
^
In file included from /home/vagrant/.rbenv/versions/2.6.7/include/ruby-2.6.0/ruby/intern.h:24:0,
from /home/vagrant/.rbenv/versions/2.6.7/include/ruby-2.6.0/ruby/ruby.h:2111,
from /home/vagrant/.rbenv/versions/2.6.7/include/ruby-2.6.0/ruby.h:33,
from mini_racer_extension.cc:2:
/home/vagrant/.rbenv/versions/2.6.7/include/ruby-2.6.0/ruby/defines.h:388:44: 警告: リテラルの接尾辞が無効です。C++11 では、リテラルと識別子の間にスペースを入れる必要があります。 [-Wliteral-suffix]
# define EXTERN __pragma(message(__FILE__"("STRINGIZE(__LINE__)"): warning: "\
^
In file included from mini_racer_extension.cc:5:0:
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h: メンバ関数 ‘void v8::TracedReferenceBase<T>::SetSlotThreadSafe(T*)’ 内:
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:912:22: エラー: 型指定子が予期されます
reinterpret_cast<std::atomic<T*>*>(&val_)->store(new_val,
^
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:912:22: エラー: ‘>’ が予期されます
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:912:22: エラー: ‘(’ が予期されます
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:912:22: エラー: ‘atomic’ is not a member of ‘std’
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:912:35: エラー: expected primary-expression before ‘*’ token
reinterpret_cast<std::atomic<T*>*>(&val_)->store(new_val,
^
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:912:36: エラー: expected primary-expression before ‘>’ token
reinterpret_cast<std::atomic<T*>*>(&val_)->store(new_val,
^
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:912:38: エラー: expected primary-expression before ‘>’ token
reinterpret_cast<std::atomic<T*>*>(&val_)->store(new_val,
^
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:913:54: エラー: ‘memory_order_relaxed’ is not a member of ‘std’
std::memory_order_relaxed);
^
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:913:80: エラー: expected ‘)’ before ‘;’ token
std::memory_order_relaxed);
^
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h: メンバ関数 ‘const T* v8::TracedReferenceBase<T>::GetSlotThreadSafe() const’ 内:
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:920:29: エラー: 型指定子が予期されます
return reinterpret_cast<std::atomic<const T*> const*>(&val_)->load(
^
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:920:29: エラー: ‘>’ が予期されます
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:920:29: エラー: ‘(’ が予期されます
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:920:29: エラー: ‘atomic’ is not a member of ‘std’
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:920:41: エラー: expected primary-expression before ‘const’
return reinterpret_cast<std::atomic<const T*> const*>(&val_)->load(
^
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:920:41: エラー: expected ‘)’ before ‘const’
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:920:41: エラー: expected ‘;’ before ‘const’
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:920:49: エラー: expected unqualified-id before ‘>’ token
return reinterpret_cast<std::atomic<const T*> const*>(&val_)->load(
^
/home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/libv8-node-15.14.0.0-x86_64-linux/vendor/v8/include/v8.h:920:49: エラー: expected initializer before ‘>’ token
大域スコープ:
cc1plus: 警告: 認識できないコマンドラインオプション "-Wno-tautological-compare" です [デフォルトで有効]
cc1plus: 警告: 認識できないコマンドラインオプション "-Wno-self-assign" です [デフォルトで有効]
cc1plus: 警告: 認識できないコマンドラインオプション "-Wno-parentheses-equality" です [デフォルトで有効]
cc1plus: 警告: 認識できないコマンドラインオプション "-Wno-constant-logical-operand" です [デフォルトで有効]
cc1plus: 警告: 認識できないコマンドラインオプション "-Wno-cast-function-type" です [デフォルトで有効]
make: *** [mini_racer_extension.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/mini_racer-0.4.0 for inspection.
Results logged to /home/vagrant/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/mini_racer-0.4.0/gem_make.out
実行するとこのような表記が出てます。
すいません、どこがエラー文なのか自分でよくわかってないです。。