BUG Segmentation fault ruby​​ 2.0.0p481(2014-05-08修订版45883)x86_64-darwin13.2.0

时间:2014-06-26 18:58:47

标签: ruby-on-rails ruby ruby-on-rails-4 homebrew rbenv

尝试运行rails srails c时收到错误。

我最近通过自制软件和rbenv安装了ruby和rails。当我运行rails new project时,应用程序已成功创建。然后我在相应的目录中执行bundle install,当我运行rails srails c时,所有内容都会顺利更新。出现以下错误:

|14:48:23| ~ rails c
/Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/ext/parser.bundle: [BUG] Segmentation fault
ruby 2.0.0p481 (2014-05-08 revision 45883) [x86_64-darwin13.2.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
   the more detail of.

-- Control frame information -----------------------------------------------
c:0031 p:-17563034837610 s:0092 e:000091 TOP    [FINISH]
c:0030 p:---- s:0090 e:000089 CFUNC  :require
c:0029 p:0009 s:0086 e:000085 CLASS  /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/ext.rb:13
c:0028 p:0011 s:0084 e:000083 CLASS  /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/ext.rb:12
c:0027 p:0057 s:0082 e:000081 TOP    /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/ext.rb:9 [FINISH]
... 

(继续前进)

  221 /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.0/lib/active_support/core_ext/object/conversions.rb
  222 /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.0/lib/active_support/core_ext/object/instance_variables.rb
  223 /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/version.rb
  224 /Users/jona/.rbenv/versions/2.0.0-p481/lib/ruby/2.0.0/ostruct.rb
  225 /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/generic_object.rb
  226 /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/common.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

完整的错误报告http://pastebin.com/ZXDcapw5

1 个答案:

答案 0 :(得分:1)

正如所承诺的,这是答案:

你以前用过rvm了吗?因为我从堆栈跟踪中看到的是rbenv和rvm都被调用。

如果是这种情况,请完全删除rvm并从头开始重新安装rbenv。