这真的很奇怪。我在这个 Rails 3.2.11 应用程序中做得很好,早些时候运行了 rspec,我创建了一个新分支,更改了一个文件,提交,然后运行 rspec spec/,当我遇到大量分段错误和堆栈跟踪时正如我所见。
我已经更新了 rvm 并尝试安装早期版本的 ruby 1.9.3。我一直挂在原始宝石套装上,并通过重新启动来保释。重新启动 OS X 10.8.3 后,我能够干净地安装 ruby 1.9.3-p429。但 rspec 仍然保释。完整的堆栈跟踪是https://gist.github.com/sam452/5808849。自从它们被清除以来,我已经捆绑安装了这些宝石。我还尝试再次运行 rspec 生成器,但它似乎只覆盖了一个支持文件。Rails、rake、cucumber 似乎运行良好。Rake 在到达 rspec 命令时失败。
我试图从堆栈跟踪中提取看似相关的部分:
Happenstance:tickat sam$ rspec spec/
/Users/sam/.rvm/gems/ruby-1.9.3-p429/gems/better_errors-0.8.0/lib/better_errors/core_ext/exception.rb:9: [BUG] Segmentation fault
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-darwin12.3.0]
控制帧信息
c:0064 p:---- s:0204 b:0204 l:000203 d:000203 CFUNC :callers
c:0063 p:0064 s:0201 b:0201 l:000290 d:0026c0 LAMBDA /Users/sam/.rvm/gems/ruby-1.9.3-p429/gems/better_errors-0.8.0/lib/better_errors/core_ext/exception.rb:9
c:0062 p:---- s:0198 b:0198 l:000197 d:000197 FINISH
Ruby 级别的回溯信息
/Users/sam/.rvm/gems/ruby-1.9.3-p429/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
/Users/sam/.rvm/gems/ruby-1.9.3-p429/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
/Users/sam/.rvm/gems/ruby-1.9.3-p429/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
/Users/sam/.rvm/gems/ruby-1.9.3-p429/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
/Users/sam/.rvm/gems/ruby-1.9.3-p429/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
/Users/sam/.rvm/gems/ruby-1.9.3-p429/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
/Users/sam/.rvm/gems/ruby-1.9.3-p429/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load'
/Users/sam/apps/tickat/spec/controllers/admin/events_controller_spec.rb:1:in `<top (required)>'
C级回溯信息
See Crash Report log file under ~/Library/Logs/CrashReporter or
/Library/Logs/CrashReporter, for the more detail of.
其他运行时信息
* Loaded script: /Users/sam/.rvm/gems/ruby-1.9.3-p429/bin/rspec
* Loaded features:
0 enumerator.so
1 /Users/sam/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin12.3.0/enc/encdb.bundle
2 /Users/sam/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin12.3.0/enc/trans/transdb.bundle
3 /Users/sam/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/defaults.rb
一直到 2030 行。