【Rails】Gemのインストールに失敗する
受付中
回答 0
投稿
- 評価
- クリップ 0
- VIEW 1,141
VScodeでRailsアプリをデバッグ実行・ステップ実行したく調べたところ、以下のGemが必要とのことでインストールを試みましたが失敗してしまいます。
・ruby-debug-ide
・debase
エラーの内容は以下です。
$ sudo gem install ruby-debug-ide
Password:
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-ide:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.3.0/gems/ruby-debug-ide-0.7.0/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby mkrf_conf.rb
Installing base gem
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.3.0/gems/debase-0.2.3/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20190718-4496-1yms5hy.rb extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
**************************************************************************
No source for ruby-2.3.7-p456 (revision 63024) provided with
debase-ruby_core_source gem. Falling back to ruby-2.3.6-p384.
**************************************************************************
checking for vm_core.h... yes
checking for iseq.h... no
Makefile creation failed
*************************************************************
NOTE: If your headers were not found, try passing
--with-ruby-include=PATH_TO_HEADERS
*************************************************************
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/$(RUBY_BASE_NAME)
--with-ruby-dir
--without-ruby-dir
--with-ruby-include
--without-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/debase-0.2.3/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/debase-0.2.3 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/debase-0.2.3/gem_make.out
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:92:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:48:in `block in build'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/tempfile.rb:295:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/ext/ext_conf_builder.rb:31:in `build'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:164:in `block (2 levels) in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:163:in `chdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:163:in `block in build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:162:in `synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:162:in `build_extension'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:201:in `block in build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:198:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/ext/builder.rb:198:in `build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/installer.rb:753:in `build_extensions'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/installer.rb:297:in `install'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/resolver/specification.rb:97:in `install'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/request_set.rb:260:in `block in install_into'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/request_set.rb:252:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/request_set.rb:252:in `install_into'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/request_set.rb:148:in `install'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/dependency_installer.rb:405:in `install'
mkrf_conf.rb:36:in `rescue in <main>'
mkrf_conf.rb:29:in `<main>'
rake failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ruby-debug-ide-0.7.0 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/ruby-debug-ide-0.7.0/gem_make.out
以下は試してみましたが、特にupdateする内容は無かったです。
ruby-debug-ideのインストールが失敗したときの対応
また、mkmf.logは以下です。(文字数の関係で一部です。すみません。)
$ cat /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/debase-0.2.3/mkmf.log
have_header: checking for vm_core.h... -------------------- no
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.6-p384/iseq.h:45:45: note: expanded from macro 'ISEQ_MARK_ARY'
#define ISEQ_MARK_ARY(iseq) (iseq)->body->mark_ary
^
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:1056:25: note: expanded from macro 'RARRAY_ASET'
const VALUE _ary = (a); \
^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.6-p384/iseq.h:19:16: note: forward declaration of 'struct rb_iseq_struct'
typedef struct rb_iseq_struct rb_iseq_t;
^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.6-p384/iseq.h:81:25: warning: implicit declaration of function 'rb_imemo_new' is invalid in C99 [-Wimplicit-function-declaration]
return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.6-p384/iseq.h:81:38: error: use of undeclared identifier 'imemo_iseq'
return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.6-p384/iseq.h:94:45: error: unknown type name 'NODE'
VALUE rb_iseq_compile_node(rb_iseq_t *iseq, NODE *node);
^
/Library/Ruby/Gems/2.3.0/gems/debase-ruby_core_source-0.10.5/lib/debase/ruby_core_source/ruby-2.3.6-p384/iseq.h:213:11: error: unknown type name 'rb_compile_option_t'
const rb_compile_option_t *option;
^
1 warning and 8 errors generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <iseq.h>
/* end */
--------------------
もし、何かお分かりの方いらっしゃいましたら、ご指摘頂けますと大変助かります。
よろしくお願い致します。
OS:mojave
-
気になる質問をクリップする
クリップした質問は、後からいつでもマイページで確認できます。
またクリップした質問に回答があった際、通知やメールを受け取ることができます。
クリップを取り消します
-
良い質問の評価を上げる
以下のような質問は評価を上げましょう
- 質問内容が明確
- 自分も答えを知りたい
- 質問者以外のユーザにも役立つ
評価が高い質問は、TOPページの「注目」タブのフィードに表示されやすくなります。
質問の評価を上げたことを取り消します
-
評価を下げられる数の上限に達しました
評価を下げることができません
- 1日5回まで評価を下げられます
- 1日に1ユーザに対して2回まで評価を下げられます
質問の評価を下げる
teratailでは下記のような質問を「具体的に困っていることがない質問」、「サイトポリシーに違反する質問」と定義し、推奨していません。
- プログラミングに関係のない質問
- やってほしいことだけを記載した丸投げの質問
- 問題・課題が含まれていない質問
- 意図的に内容が抹消された質問
- 過去に投稿した質問と同じ内容の質問
- 広告と受け取られるような投稿
評価が下がると、TOPページの「アクティブ」「注目」タブのフィードに表示されにくくなります。
質問の評価を下げたことを取り消します
この機能は開放されていません
評価を下げる条件を満たしてません
質問の評価を下げる機能の利用条件
この機能を利用するためには、以下の事項を行う必要があります。
- 質問回答など一定の行動
-
メールアドレスの認証
メールアドレスの認証
-
質問評価に関するヘルプページの閲覧
質問評価に関するヘルプページの閲覧
まだ回答がついていません
15分調べてもわからないことは、teratailで質問しよう!
- ただいまの回答率 88.34%
- 質問をまとめることで、思考を整理して素早く解決
- テンプレート機能で、簡単に質問をまとめられる