遇到此错误时,我正在尝试为特定存储库设置本地环境。
An error occurred while installing mini_racer (0.1.15), and Bundler cannot continue.
Make sure that `gem install mini_racer -v '0.1.15' --source 'https://rubygems.org/'` succeeds before bundling.
我的本地计算机是macOS X(Mojave)。我安装了ruby 2.1.5,更新了捆绑程序并运行bundle install
这是详细的错误:-
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/pavan7vasan/.rvm/gems/ruby-2.1.5/gems/mini_racer-0.1.15/ext/mini_racer_extension
/Users/pavan7vasan/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20181225-93631-97fmbf.rb extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
creating Makefile
current directory: /Users/pavan7vasan/.rvm/gems/ruby-2.1.5/gems/mini_racer-0.1.15/ext/mini_racer_extension
make "DESTDIR=" clean
current directory: /Users/pavan7vasan/.rvm/gems/ruby-2.1.5/gems/mini_racer-0.1.15/ext/mini_racer_extension
make "DESTDIR="
compiling mini_racer_extension.cc
clang: warning: argument unused during compilation: '-rdynamic' [-Wunused-command-line-argument]
In file included from mini_racer_extension.cc:2:
In file included from /Users/pavan7vasan/.rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/ruby.h:33:
In file included from /Users/pavan7vasan/.rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/ruby/ruby.h:1694:
/Users/pavan7vasan/.rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/ruby/intern.h:47:19: warning: 'register' storage class specifier is deprecated and incompatible with C++17
[-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
^~~~~~~~~
/Users/pavan7vasan/.rvm/rubies/ruby-2.1.5/include/ruby-2.1.0/ruby/intern.h:47:36: warning: 'register' storage class specifier is deprecated and incompatible with C++17
[-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
^~~~~~~~~
2 warnings generated.
linking shared-object mini_racer_extension.bundle
clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mini_racer_extension.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/pavan7vasan/.rvm/gems/ruby-2.1.5/gems/mini_racer-0.1.15 for inspection.
Results logged to /Users/pavan7vasan/.rvm/gems/ruby-2.1.5/extensions/x86_64-darwin-18/2.1.0/mini_racer-0.1.15/gem_make.out
An error occurred while installing mini_racer (0.1.15), and Bundler cannot continue.
Make sure that `gem install mini_racer -v '0.1.15' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
mini_racer
我根据以下相关链接研究了该问题:https://github.com/discourse/mini_racer/issues/104
基于几个堆栈溢出的帖子,我卸载了libv8 gem,然后尝试进行gem install mini_racer
。不幸的是,它没有用
即使重新安装红宝石也没有任何效果。我该如何解决这个问题?
此堆栈溢出帖子是针对与我的similar post类似的问题,它说设置不同的版本可能是最好的,但不确定是Ruby(2.1.5)的最佳版本,并且导轨(3.2.xx)