我已经安装了Memcached并尝试了一些简单的例子,它们运行良好。现在我正在尝试创建服务器并使用Memcached功能。
我已经开始使用最简单的example.rb文件:
require 'memcached'
puts 'Hello'
但是,当我尝试加载文件时,我收到以下错误。
/Users/matiii79/.rvm/gems/ruby-2.2.0@global/gems/memcached- 1.8.0 / lib / rlibmemcached.bundle:[BUG]分段错误0x00000000000440 ruby 2.2.0p0(2014-12-25修订版49005) [x86_64的-darwin14]
- 崩溃报告日志信息----------------------------------------- ---请参阅下面的崩溃报告日志文件: *〜/ Library / Logs / CrashReporter * / Library / Logs / CrashReporter *〜/ Library / Logs / DiagnosticReports * / Library / Logs / DiagnosticReports了解更多详情。
- 控制框架信息------------------------------------------ ----- c:0009 p:-17567916705026 s:0039 e:000038 TOP [FINISH] c:0008 p:---- s:0037 e:000036 CFUNC:要求c:0007 p:0113 s:0033 e:000032方法 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54 c:0006 p:0017 s:0023 e:000022 TOP
/Users/matiii79/.rvm/gems/ruby-2.2.0@global/gems/memcached-1.8.0/lib/memcached.rb:19 [完] c:0005 p:---- s:0021 e:000020 CFUNC:require c:0004 p:0083 s:0017 e:000016救援 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128 c:0003 p:0388 s:0014 e:000013方法 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39 c:0002 p:0007 s:0004 E:000820 EVAL示例。 rb:1 [完成] c:0001 p:0000 s:0002 E:000f40 TOP [FINISH]- Ruby级别的回溯信息----------------------------------------示例.rb:1:
<main>' /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in
要求&#39; /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:inrescue in require' /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in
需要&#39; /Users/matiii79/.rvm/gems/ruby-2.2.0@global/gems/memcached-1.8.0/lib/memcached.rb:19:in<top (required)>' /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in
需要&#39; /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in`require&#39;- 机器注册上下文------------------------------------------ ------ rax:0x0000000000000030 rbx:0x0000000106766f59 rcx:0x0000000000000000 rdx:0xfffffffffffffff0 rdi:0x0000000000000030 rsi: 0x0000000000000000 rbp:0x00007fff598f6900 rsp:0x00007fff598f6900 r8:0x0000000000000017 r9:0x00000000f0000000 r10: 0x0000000000000a58 r11:0x00007fff93182d10 r12:0x00007fff78694070 r13:0x00007fd2cb500000 r14:0x0000000000000004 r15: 0x00007fff598f69e0 rip:0x00000001067cbbe6 rfl:0x0000000000010246
- C级回溯信息----------------------------------------- - 0 libruby.2.2.0.dylib 0x00000001064a6ccb rb_vm_bugreport + 155 1 libruby.2.2.0.dylib
0x000000010634b0e0 rb_bug_context + 480 2 libruby.2.2.0.dylib
0x00000001064232a3 sigsegv + 83 3 libsystem_platform.dylib
0x00007fff93181f1a _sigtramp + 26 4 libruby.2.2.0.dylib
0x00000001067cbbe6 ruby_xmalloc + 17 5 ??? 0x00007fff598f6920 0x0 + 140734695958816- 其他运行时信息------------------------------------------ -----
已加载的脚本:example.rb
已加载的功能:
0 enumerator.so 1理性。所以 2复杂。所以 3 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/x86_64-darwin14/enc/encdb.bundle 4 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/x86_64-darwin14/enc/trans/transdb.bundle 5 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/unicode_normalize.rb 6 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/x86_64-darwin14/rbconfig.rb 7 thread.rb 8 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/x86_64-darwin14/thread.bundle 9 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/compatibility.rb 10 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/defaults.rb 11 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/deprecate.rb 12 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/errors.rb 13 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/version.rb 14 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/requirement.rb 15 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/platform.rb 16 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/basic_specification.rb 17 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/stub_specification.rb 18 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/util/stringio.rb 19 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb 20 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/exceptions.rb 21 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb 22 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/monitor.rb
23 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb 24 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems.rb 25 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/path_support.rb 26 /Users/matiii79/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb[注意]您可能在Ruby解释器中遇到过错误或 扩展库。欢迎提供错误报告。别忘了包括 上面的崩溃报告日志文件。详情如下: http://www.ruby-lang.org/bugreport.html
中止陷阱:6
任何想法是怎么回事?当然,如果我删除example.rb文件的第一行,它加载正常。