Rubymine 在尝试 运行 rspec 测试时抛出 **[BUG] 分段错误**
Rubymine throws a **[BUG] Segmentation fault** when trying to run rspec test
我正在尝试 运行 我的 rspec 来自 rubymine 的测试,但收到此错误:
...[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 并遵循了一些关于如何解决这个问题的堆栈溢出答案,但似乎对我没有用。
我还尝试使用以下命令升级 rubymine 调试器:gem install ruby-debug-base19x --pre
和 gem 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)
,
但第二次成功了。即便如此,当我尝试 运行 我的测试时,我仍然在 rubymine 上遇到初始错误。
顺便说一句:在终端上的测试 运行 很好,在 rubymine 上来自其他项目的测试 运行 很好。只有这个特定项目不是 运行ning。
我该怎么做才能让我的 rubymine 运行 这些 rspec 测试来自我的项目。感谢您的帮助。
我终于做对了。我必须进入 Rubymine 的 preferences => Languages and Frameworks => Ruby SDK and Gems
将项目的 ruby 版本从 2.1.2
更新为项目的 .ruby-version
文件中指定的版本,即 2.1.6
.
执行此操作后,一切正常。
我正在尝试 运行 我的 rspec 来自 rubymine 的测试,但收到此错误:
...[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 并遵循了一些关于如何解决这个问题的堆栈溢出答案,但似乎对我没有用。
我还尝试使用以下命令升级 rubymine 调试器:gem install ruby-debug-base19x --pre
和 gem 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)
,
但第二次成功了。即便如此,当我尝试 运行 我的测试时,我仍然在 rubymine 上遇到初始错误。
顺便说一句:在终端上的测试 运行 很好,在 rubymine 上来自其他项目的测试 运行 很好。只有这个特定项目不是 运行ning。
我该怎么做才能让我的 rubymine 运行 这些 rspec 测试来自我的项目。感谢您的帮助。
我终于做对了。我必须进入 Rubymine 的 preferences => Languages and Frameworks => Ruby SDK and Gems
将项目的 ruby 版本从 2.1.2
更新为项目的 .ruby-version
文件中指定的版本,即 2.1.6
.
执行此操作后,一切正常。