gpt4 book ai didi

ruby - 如何使用 Intellij 12.1.7 调试 Ruby 2.1.1p76

转载 作者:数据小太阳 更新时间:2023-10-29 08:12:22 24 4
gpt4 key购买 nike

如何使用 Intellij 12.1.7 调试 Ruby 2.1.1p76?我可以很好地运行我的脚本,但是当我单击调试按钮时,我会看到一个对话框:

The gem ruby-debug-base required by the debugger is not currently installed. Would you like to install it?

当我点击"is"时,我得到了这个:

10:36:21 AM Error running e2e
Failed to Install Gems. Following gems were not installed:
linecache (0.46): Error installing linecache:
ERROR: Failed to build gem native extension. /home/jared/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb Can't handle 1.9.x yet *** 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=/home/jared/.rvm/rubies/ruby-2.1.1/bin/ruby extconf failed, exit code 1 Gem files will remain installed in /home/jared/.rvm/gems/ruby-2.1.1@global/gems/linecache-0.46 for inspection. Results logged to /home/jared/.rvm/gems/ruby-2.1.1@global/extensions/x86_64-linux/2.1.0/linecache-0.46/gem_make.out
/home/jared/.IntelliJIdea12/config/plugins/ruby/rb/gems/ruby-debug-base-0.10.5.rc1.gem: Error installing ruby-debug-base-0.10.5.rc1.gem:
ERROR: Failed to build gem native extension. /home/jared/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb Can't handle 1.9.x yet *** 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=/home/jared/.rvm/rubies/ruby-2.1.1/bin/ruby extconf failed, exit code 1 Gem files will remain installed in /home/jared/.rvm/gems/ruby-2.1.1@global/gems/linecache-0.46 for inspection. Results logged to /home/jared/.rvm/gems/ruby-2.1.1@global/extensions/x86_64-linux/2.1.0/linecache-0.46/gem_make.out

我知道我可以升级到 Intellij 13 来解决这个问题,但我不想这样做。

最佳答案

您可以使用 Ruby 远程调试。

  1. 安装 rdebug-ide:

    gem install ruby-debug-ide --pre
  2. 在 IDEA 中创建“Ruby 远程调试”配置

  3. 从终端运行脚本:

    rdebug-ide --port 1234 --dispatcher-port 26162 -- yourscript.rb
  4. 在IDEA中按“调试”

关于ruby - 如何使用 Intellij 12.1.7 调试 Ruby 2.1.1p76,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22995176/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com