guchi063926
@guchi063926 (オウ キ)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

RubyMineデバッグできない問題

解決したいこと

Docker-composeでRubyMineデバッグできませんと言うこと。
Mac mini (2018)で下記のソフトバージョン
rails: 7.0.1
ruby: 3.0.3p157
docker: 20.10.10

gemfile にて下記gemを加えて
gem "debase"
gem "ruby-debug-ide"

下記発生している問題・エラー

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /app/tmp/bundle/ruby/3.0.0/gems/debase-0.2.4.1/ext
/usr/local/bin/ruby -I /usr/local/lib/ruby/3.0.0 -r ./siteconf20220112-53-z2unz8.rb extconf.rb
*** 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=/usr/local/bin/$(RUBY_BASE_NAME)
<internal:/usr/local/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- debase/ruby_core_source (LoadError)
        from <internal:/usr/local/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from extconf.rb:28:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /app/tmp/bundle/ruby/3.0.0/gems/debase-0.2.4.1 for inspection.
Results logged to /app/tmp/bundle/ruby/3.0.0/extensions/x86_64-linux-musl/3.0.0/debase-0.2.4.1/gem_make.out

  /usr/local/lib/ruby/3.0.0/rubygems/ext/builder.rb:93:in `run'
  /usr/local/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:47:in `block in build'
  /usr/local/lib/ruby/3.0.0/tempfile.rb:317:in `open'
  /usr/local/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:26:in `build'
  /usr/local/lib/ruby/3.0.0/rubygems/ext/builder.rb:159:in `build_extension'
  /usr/local/lib/ruby/3.0.0/rubygems/ext/builder.rb:193:in `block in build_extensions'
  /usr/local/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in `each'
  /usr/local/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in `build_extensions'
  /usr/local/lib/ruby/3.0.0/rubygems/installer.rb:845:in `build_extensions'
  /usr/local/lib/ruby/3.0.0/bundler/rubygems_gem_installer.rb:71:in `build_extensions'
  /usr/local/lib/ruby/3.0.0/bundler/rubygems_gem_installer.rb:28:in `install'
  /usr/local/lib/ruby/3.0.0/bundler/source/rubygems.rb:200:in `install'
  /usr/local/lib/ruby/3.0.0/bundler/installer/gem_installer.rb:54:in `install'
  /usr/local/lib/ruby/3.0.0/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /usr/local/lib/ruby/3.0.0/bundler/installer/parallel_installer.rb:186:in `do_install'
  /usr/local/lib/ruby/3.0.0/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
  /usr/local/lib/ruby/3.0.0/bundler/worker.rb:62:in `apply_func'
  /usr/local/lib/ruby/3.0.0/bundler/worker.rb:57:in `block in process_queue'
  /usr/local/lib/ruby/3.0.0/bundler/worker.rb:54:in `loop'
  /usr/local/lib/ruby/3.0.0/bundler/worker.rb:54:in `process_queue'
  /usr/local/lib/ruby/3.0.0/bundler/worker.rb:91:in `block (2 levels) in create_threads'

An error occurred while installing debase (0.2.4.1), and Bundler cannot continue.

In Gemfile:
  debase

https://stackoverflow.com/questions/23686384/debase-loaderror-when-debugging-in-rubymine-with-ruby-2-0-0-on-os-x-mavericks
そして、上記スタックオーバーフローの質問回答毎に試しにやりましたが、全部効かない。

当該gem加えなったら

下記のようにエラー出てきた。
截屏2022-01-12 下午2.49.13.png

一体どうやっての

  # gem "pry-byebug"
  gem "ruby_core_source"
  gem "debase"
  gem "ruby-debug-ide", require: false

上記のようにgemfileを加えても、やはり同じエラーが出てきました。

ローカルで試し

もしローカルでruby-debug-ideをinstallして、rubymineのSDKに加入して、下記の手順で

docker exec -it aca5c446a1ef bash
gem install ruby-debug-ide
そしてpreferences->Ruby SDK and Gemsに遷移、下記のように

截屏2022-01-12 下午3.01.43.png
そして実行してみると、下記のようにエラーが出てました。
截屏2022-01-12 下午3.04.27.png

誰か助けてくれますか?

0

No Answers yet.

Your answer might help someone💌