【问题标题】:Rubymine throws a **[BUG] Segmentation fault** when trying to run rspec testRubymine 在尝试运行 rspec 测试时抛出 **[BUG] 分段错误**
【发布时间】:2015-06-01 22:45:58
【问题描述】:

我正在尝试从 ruby​​mine 运行我的 rspec 测试,但收到此错误:

 ...[BUG] Segmentation fault at 0x00000000000438
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:
     * ~/Library/Logs/CrashReporter
     * /Library/Logs/CrashReporter
     * ~/Library/Logs/DiagnosticReports
     * /Library/Logs/DiagnosticReports
   for more details.

-- Control frame information -----------------------------------------------
c:0051 p:-17566078017732 s:0152 e:000151 TOP    [FINISH]
c:0050 p:---- s:0150 e:000149 CFUNC  :require
c:0049 p:0022 s:0146 e:000145 BLOCK  /Users/Sunday/workspace/resilience/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.6.2/lib/nokogiri.rb:29
c:0048 p:0149 s:0143 e:000142 TOP    /Users/Sunday/workspace/resilience/vendor/bundle/ruby/2.1.0/gems/nokogiri-1.6.6.2/lib/nokogiri.rb:25 [FINISH]
c:0047 p:---- s:0141 e:000140 CFUNC  :require
c:0046 p:0064 s:0137 e:000136 TOP    /Users/Sunday/workspace/resilience/vendor/bundle/ruby/2.1.0/gems/loofah-2.0.2/lib/loofah.rb:3 [FINISH]
c:0045 p:---- s:0135 e:000134 CFUNC  :require...

我已经在 google 上查看过,并遵循了一些关于如何解决此问题的堆栈溢出答案,但似乎没有对我有用。

我还尝试使用以下命令升级 ruby​​mine 调试器:gem install ruby-debug-base19x --pregem install ruby-debug-ide --pre

第一个抛出错误: ruby_debug.c:861:98: error: no member named 'bp' in 'struct rb_control_frame_struct' if (debug_context->frames[debug_context->stack_size - 1].info.runtime.bp <= thread->cfp->bp), 但第二次成功了。即使这样,当我尝试运行我的测试时,我仍然会收到关于 ruby​​mine 的初始错误。

顺便说一句:测试在终端上运行良好,其他项目的测试在 ruby​​mine 上运行良好。只有这个特定的项目没有运行。

如何让我的 ruby​​mine 从我的项目中运行这些 rspec 测试。感谢您的帮助。

【问题讨论】:

    标签: ruby-on-rails-4 rubymine


    【解决方案1】:

    我终于做对了。我必须进入 Rubymine 的 preferences =&gt; Languages and Frameworks =&gt; Ruby SDK and Gems 以将项目的 ruby​​ 版本从 2.1.2 更新为项目的 .ruby-version 文件中指定的版本,即 2.1.6

    执行此操作后,一切正常。

    【讨论】:

      猜你喜欢
      • 2012-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多