我正在尝试使用mini-test模式让我能够直接从emacs激活和运行我的测试。
我的〜/ .emacs的相关ruby部分,如下所示:
(add-hook 'ruby-mode-hook 'robe-mode)
(add-to-list 'auto-mode-alist
'("\\.\\(?:gemspec\\|irbrc\\|gemrc\\|rake\\|rb\\|ru\\|thor\\)\\'" . ruby-mode))
(add-to-list 'auto-mode-alist
'("\\(Capfile\\|Gemfile\\(?:\\.[a-zA-Z0-9._-]+\\)?\\|[rR]akefile\\)\\'" . ruby-mode))
(require 'minitest)
(add-hook 'ruby-mode-hook 'minitest-mode)
(add-hook 'ruby-mode-hook
(lambda () (rvm-activate-corresponding-ruby)))
每当我通过点击X-c ,s
激活测试时,我都会遇到段错误。转储位于此帖的底部。
Minitest执行以下行:
bundle exec ruby -Ilib\:test\:spec /Users/paulcowan/projects/crm/test/integration/contacts/import_contact_test.rb -ntest_primary_values_set_if_provided
如果我在普通终端中执行此操作,那么它运行正常但是当我在emacs中激活它时,我得到了这个段错误:
/Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/oj-2.1.4/ext/oj/oj.bundle: [BUG] Segmentation fault
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]
-- 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
the more detail of.
-- Control frame information -----------------------------------------------
c:0010 p:-17526627450910 s:0033 e:000032 TOP [FINISH]
c:0009 p:---- s:0031 e:000030 CFUNC :require
c:0008 p:0081 s:0027 e:000026 TOP /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/oj-2.1.4/lib/oj.rb:34 [FINISH]
c:0007 p:---- s:0025 e:000024 CFUNC :require
c:0006 p:0164 s:0021 e:000020 TOP /Users/paulcowan/projects/crm/app.rb:16 [FINISH]
c:0005 p:---- s:0014 e:000013 CFUNC :require_relative
c:0004 p:0081 s:0010 E:0018a8 TOP /Users/paulcowan/projects/crm/test/test_helper.rb:23 [FINISH]
c:0003 p:---- s:0008 e:000007 CFUNC :require_relative
c:0002 p:0007 s:0004 E:000d78 EVAL /Users/paulcowan/projects/crm/test/jobs/import_contacts_job_test.rb:1 [FINISH]
c:0001 p:0000 s:0002 E:0022b8 TOP [FINISH]
/Users/paulcowan/projects/crm/test/jobs/import_contacts_job_test.rb:1:in `<main>'
/Users/paulcowan/projects/crm/test/jobs/import_contacts_job_test.rb:1:in `require_relative'
/Users/paulcowan/projects/crm/test/test_helper.rb:23:in `<top (required)>'
/Users/paulcowan/projects/crm/test/test_helper.rb:23:in `require_relative'
/Users/paulcowan/projects/crm/app.rb:16:in `<top (required)>'
/Users/paulcowan/projects/crm/app.rb:16:in `require'
/Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/oj-2.1.4/lib/oj.rb:34:in `<top (required)>'
/Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/oj-2.1.4/lib/oj.rb:34:in `require'
-- C level backtrace information -------------------------------------------
-- Other runtime information -----------------------------------------------
* Loaded script: /Users/paulcowan/projects/crm/test/jobs/import_contacts_job_test.rb
* Loaded features:
0 enumerator.so
1 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/enc/encdb.bundle
2 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/enc/trans/transdb.bundle
3 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb
4 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/compatibility.rb
5 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/defaults.rb
6 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/deprecate.rb
7 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/errors.rb
8 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/version.rb
9 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/requirement.rb
10 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/platform.rb
11 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb
12 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/exceptions.rb
13 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb
14 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/thread.rb
15 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/monitor.rb
16 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb
17 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems.rb
18 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/pathname.bundle
19 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/pathname.rb
20 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/constants.rb
21 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/user_interaction.rb
22 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/etc.bundle
23 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/config_file.rb
24 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/rubygems_integration.rb
25 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/current_ruby.rb
26 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb
27 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/shared_helpers.rb
28 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb
29 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/gem_path_manipulation.rb
30 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/gem_helpers.rb
31 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/match_platform.rb
32 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/rubygems_ext.rb
33 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/version.rb
34 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler.rb
35 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/settings.rb
36 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/path_support.rb
37 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/digest.bundle
38 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/digest.rb
39 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/digest/sha1.bundle
40 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/set.rb
41 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/definition.rb
42 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/dependency.rb
43 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/ruby_dsl.rb
44 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/dsl.rb
45 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/ruby_version.rb
46 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/source.rb
47 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/uri/common.rb
48 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/uri/generic.rb
49 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/uri/ftp.rb
50 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/uri/http.rb
51 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/uri/https.rb
52 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/uri/ldap.rb
53 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/uri/ldaps.rb
54 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/uri/mailto.rb
55 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/uri.rb
56 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/cgi/core.rb
57 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/cgi/util.rb
58 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/cgi/cookie.rb
59 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/cgi.rb
60 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/socket.bundle
61 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/socket.rb
62 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/fcntl.bundle
63 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/timeout.rb
64 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/openssl.bundle
65 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/openssl/bn.rb
66 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/openssl/cipher.rb
67 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/stringio.bundle
68 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/openssl/config.rb
69 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/openssl/digest.rb
70 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/openssl/x509.rb
71 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/openssl/buffering.rb
72 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/openssl/ssl.rb
73 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/openssl.rb
74 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/securerandom.rb
75 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/resolv.rb
76 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/remote_fetcher.rb
77 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/text.rb
78 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/name_tuple.rb
79 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/spec_fetcher.rb
80 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/source/rubygems.rb
81 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/source/path.rb
82 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/source/git.rb
83 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/strscan.bundle
84 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/lockfile_parser.rb
85 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/lazy_specification.rb
86 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb
87 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/forwardable.rb
88 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/spec_set.rb
89 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/environment.rb
90 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/runtime.rb
91 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/index.rb
92 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/remote_specification.rb
93 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/endpoint_specification.rb
94 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/dep_proxy.rb
95 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/source/git/git_proxy.rb
96 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/setup.rb
97 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/configuration.rb
98 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/exit_codes.rb
99 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/multi_json-1.9.2/lib/multi_json/options.rb
100 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/multi_json-1.9.2/lib/multi_json/version.rb
101 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/multi_json-1.9.2/lib/multi_json/adapter_error.rb
102 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/multi_json-1.9.2/lib/multi_json/parse_error.rb
103 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/multi_json-1.9.2/lib/multi_json.rb
104 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/json.rb
105 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/adapters.rb
106 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/source_file.rb
107 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/file_list.rb
108 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/result.rb
109 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/filter.rb
110 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/formatter/simple_formatter.rb
111 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb
112 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/formatter.rb
113 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/last_run.rb
114 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/merge_helpers.rb
115 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/result_merger.rb
116 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/command_guesser.rb
117 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/version.rb
118 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb
119 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/date_core.bundle
120 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/date/format.rb
121 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/date.rb
122 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/time.rb
123 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-html-0.7.1/lib/simplecov-html/version.rb
124 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-html-0.7.1/lib/simplecov-html.rb
125 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov/defaults.rb
126 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/simplecov-0.7.1/lib/simplecov.rb
127 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/coverage.bundle
128 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/oj-2.1.4/lib/oj/version.rb
129 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/oj-2.1.4/lib/oj/bag.rb
130 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/oj-2.1.4/lib/oj/error.rb
131 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/oj-2.1.4/lib/oj/mimic.rb
132 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/oj-2.1.4/lib/oj/saj.rb
133 /Users/paulcowan/.rvm/gems/ruby-2.0.0-p353/gems/oj-2.1.4/lib/oj/schandler.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
abort trap: 6 at Thu Aug 14 05:46:16