- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
rake spec
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/common.rb:67: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0057 p:---- s:0169 b:0169 l:000168 d:000168 CFUNC :initialize
c:0056 p:---- s:0167 b:0167 l:000166 d:000166 CFUNC :new
c:0055 p:0099 s:0164 b:0162 l:000161 d:000161 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/common.rb:67
c:0054 p:0090 s:0153 b:0152 l:000151 d:000151 CLASS /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext.rb:17
c:0053 p:0011 s:0150 b:0150 l:000149 d:000149 CLASS /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext.rb:12
c:0052 p:0074 s:0148 b:0148 l:000147 d:000147 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext.rb:9
c:0051 p:---- s:0146 b:0146 l:000145 d:000145 FINISH
c:0050 p:---- s:0144 b:0144 l:000143 d:000143 CFUNC :require
c:0049 p:0027 s:0140 b:0140 l:000139 d:000139 CLASS /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json.rb:58
c:0048 p:0021 s:0138 b:0138 l:000137 d:000137 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json.rb:54
c:0047 p:---- s:0136 b:0136 l:000135 d:000135 FINISH
c:0046 p:---- s:0134 b:0134 l:000133 d:000133 CFUNC :require
c:0045 p:0011 s:0130 b:0130 l:000129 d:000129 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.1/lib/active_support/core_ext/object/json.rb:2
c:0044 p:---- s:0128 b:0128 l:000127 d:000127 FINISH
c:0043 p:---- s:0126 b:0126 l:000125 d:000125 CFUNC :require
c:0042 p:0107 s:0122 b:0122 l:000121 d:000121 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.1/lib/active_support/core_ext/object.rb:11
c:0041 p:---- s:0120 b:0120 l:000119 d:000119 FINISH
c:0040 p:---- s:0118 b:0118 l:000117 d:000117 CFUNC :require
c:0039 p:0023 s:0114 b:0114 l:000113 d:000113 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/configuration.rb:2
c:0038 p:---- s:0112 b:0112 l:000111 d:000111 FINISH
c:0037 p:---- s:0110 b:0110 l:000109 d:000109 CFUNC :require
c:0036 p:0023 s:0106 b:0106 l:000105 d:000105 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/railtie.rb:2
c:0035 p:---- s:0104 b:0104 l:000103 d:000103 FINISH
c:0034 p:---- s:0102 b:0102 l:000101 d:000101 CFUNC :require
c:0033 p:0011 s:0098 b:0098 l:000097 d:000097 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/engine.rb:1
c:0032 p:---- s:0096 b:0096 l:000095 d:000095 FINISH
c:0031 p:---- s:0094 b:0094 l:000093 d:000093 CFUNC :require
c:0030 p:0071 s:0090 b:0090 l:000089 d:000089 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/application.rb:6
c:0029 p:---- s:0088 b:0088 l:000087 d:000087 FINISH
c:0028 p:---- s:0086 b:0086 l:000085 d:000085 CFUNC :require
c:0027 p:0095 s:0082 b:0082 l:000081 d:000081 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails.rb:11
c:0026 p:---- s:0080 b:0080 l:000079 d:000079 FINISH
c:0025 p:---- s:0078 b:0078 l:000077 d:000077 CFUNC :require
c:0024 p:0011 s:0074 b:0074 l:000073 d:000073 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/all.rb:1
c:0023 p:---- s:0072 b:0072 l:000071 d:000071 FINISH
c:0022 p:---- s:0070 b:0070 l:000069 d:000069 CFUNC :require
c:0021 p:0038 s:0066 b:0066 l:000065 d:000065 TOP /home/starkers/Documents/opensource_projects/gitlabhq/config/application.rb:3
c:0020 p:---- s:0064 b:0064 l:000063 d:000063 FINISH
c:0019 p:---- s:0062 b:0062 l:000061 d:000061 CFUNC :require
c:0018 p:0036 s:0058 b:0058 l:000057 d:000057 METHOD /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36
c:0017 p:0026 s:0051 b:0051 l:000050 d:000050 TOP /home/starkers/Documents/opensource_projects/gitlabhq/Rakefile:5
c:0016 p:---- s:0049 b:0049 l:000048 d:000048 FINISH
c:0015 p:---- s:0047 b:0047 l:000046 d:000046 CFUNC :load
c:0014 p:0013 s:0043 b:0043 l:000042 d:000042 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/rake_module.rb:28
c:0013 p:0252 s:0039 b:0039 l:000038 d:000038 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:687
c:0012 p:0009 s:0034 b:0034 l:000027 d:000033 BLOCK /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:94
c:0011 p:0007 s:0032 b:0032 l:000031 d:000031 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:176
c:0010 p:0011 s:0028 b:0028 l:000027 d:000027 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:93
c:0009 p:0019 s:0025 b:0025 l:000018 d:000024 BLOCK /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:77
c:0008 p:0007 s:0023 b:0023 l:000022 d:000022 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:176
c:0007 p:0011 s:0019 b:0019 l:000018 d:000018 METHOD /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:75
c:0006 p:0060 s:0016 b:0016 l:000015 d:000015 TOP /home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/bin/rake:33
c:0005 p:---- s:0014 b:0014 l:000013 d:000013 FINISH
c:0004 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC :load
c:0003 p:0167 s:0008 b:0008 l:001ac8 d:001588 EVAL /usr/local/bin/rake:23
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001ac8 d:001ac8 TOP
-- Ruby level backtrace information ----------------------------------------
/usr/local/bin/rake:23:in `<main>'
/usr/local/bin/rake:23:in `load'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:77:in `block in run'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:93:in `load_rakefile'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:94:in `block in load_rakefile'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/application.rb:687:in `raw_load_rakefile'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load'
/home/starkers/Documents/opensource_projects/gitlabhq/Rakefile:5:in `<top (required)>'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/home/starkers/Documents/opensource_projects/gitlabhq/config/application.rb:3:in `<top (required)>'
/home/starkers/Documents/opensource_projects/gitlabhq/config/application.rb:3:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/all.rb:1:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/all.rb:1:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails.rb:11:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails.rb:11:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/application.rb:6:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/application.rb:6:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/engine.rb:1:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/engine.rb:1:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/railtie.rb:2:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/railtie.rb:2:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/configuration.rb:2:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.1.1/lib/rails/configuration.rb:2:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.1/lib/active_support/core_ext/object.rb:11:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.1/lib/active_support/core_ext/object.rb:11:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.1/lib/active_support/core_ext/object/json.rb:2:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.1/lib/active_support/core_ext/object/json.rb:2:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json.rb:54:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json.rb:58:in `<module:JSON>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json.rb:58:in `require'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext.rb:9:in `<top (required)>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext.rb:12:in `<module:JSON>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/ext.rb:17:in `<module:Ext>'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/common.rb:67:in `generator='
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/common.rb:67:in `new'
/home/starkers/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/lib/json/common.rb:67:in `initialize'
-- A lot more stuff here!
[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
Aborted (core dumped)
运行 rake spec
时,我得到了上面的结果。我无法运行我的 Rails 项目。
1) 有人可以解释我如何使用这些信息来查找错误吗?
2) 谁能看到我的个人问题?我正在尝试运行 Gitlab,这是一个相当大的项目,其他人可能会遇到它
3) 如果这确实是一个错误,我该如何解决?更改 rails 版本?更改 ruby 版本?我该怎么做。
我在 Ubuntu 上并通过 RVM 安装。所以我可以通过它改变 ruby 版本。那我的 gem 呢? ~> x.x.x
选项和 bundle 安装?
最佳答案
其中一个依赖项 json
gem 似乎有问题。按照您的编号:
当您看到段错误时,它通常涉及不匹配的 gemset 或针对错误版本的 ruby 编译的 gem native 扩展,因此您应该朝那个方向看。
事实上,第一行报告 gem 是从一个 ruby 2.0.0p247 gemset 中获取的,而第二行报告 ruby 1.9.3p194 作为当前解释器。
在您的特定情况下,我会cd
进入项目文件夹,使用gem pristine --all
重建gemset,使用 重建项目依赖项>bundle update
然后尝试使用项目 binstub 重新运行命令:./bin/rake rspec
。
对我来说这似乎不是错误,但你应该时刻注意你使用的 ruby 版本。使用 RVM,您可以指定默认的广泛系统 ruby 版本和 gemset,但也可以根据需要指定任意数量的项目特定 ruby 版本和 gemset,但这有时会导致麻烦。
希望对您有所帮助。
关于ruby-on-rails - 中止(核心转储)ruby 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24248229/
以下是一个非常简单的ruby服务器。 require 'socket' local_socket = Socket.new(:INET, :STREAM) local_addr = Socket.
我正在使用 OS X(使用 bash),并且是 unix 的新手。我想知道是否可以修改一些文件以便运行 ruby 程序,我不需要“ruby file.rb”,而是可以运行“ruby.rb”。 有理
我在用 Ruby 替换字符串时遇到一些问题。 我的原文:人之所为不如兽之所为。 我想替换为:==What== human does is not like ==what== animal does.
我想在一个循环中从 Ruby 脚本做这样的事情: 写一个文件a.rb(每次迭代都会改变) 执行系统(ruby 'a.rb') a.rb 将带有结果的字符串写入文件“results” a.rb 完成并且
我的问题是尝试创建一个本地服务器,以便我可以理解由我的新团队开发的应用程序。我的问题是我使用的是 Ruby 2.3.3,而 Gemfile 需要 2.3.1。我无法编辑 Gemfile,因为我被告知很
我有一个使用 GLI 框架用 Ruby 编写的命令行实用程序。我想在我的主目录中配置我的命令行实用程序,使用 Ruby 本身作为 DSL 来处理它(类似于 Gemfile 或 Rakefile)。 我
我的 Rails 应用 Controller 中有这段代码: def delete object = model.datamapper_class.first(:sourced_id =>
我正在寻找的解析器应该: 对 Ruby 解析友好, 规则设计优雅, 产生用户友好的解析错误, 用户文档的数量应该比计算器示例多, UPD:允许在编写语法时省略可选的空格。 快速解析不是一个重要的特性。
我刚开始使用 Ruby,听说有一种“Ruby 方式”编码。除了 Ruby on Rails 之外,还有哪些项目适合学习并被认可且设计良好? 最佳答案 Prawn被明确地创建为不仅是一个该死的好 PDF
我知道之前有人问过类似的问题,但是我该如何构建一个无需在前面输入“ruby”就可以在终端中运行的 Ruby 文件呢? 这里的最终目标是创建一个命令行工具包类型的东西。现在,为了执行我希望用户能够执行的
例如哈希a是{:name=>'mike',:age=>27,:gender=>'male'}哈希 b 是 {:name=>'mike'} 我想知道是否有更好的方法来判断 b 哈希是否在 a 哈希内,而
我是一名决定学习 Ruby 和 Ruby on Rails 的 ASP.NET MVC 开发人员。我已经有所了解并在 RoR 上创建了一个网站。在 ASP.NET MVC 上开发,我一直使用三层架构:
最近我看到 Gary Bernhardt 展示了他用来在 vim 中执行 Ruby 代码的 vim 快捷方式。捷径是 :map ,t :w\|:!ruby %. 似乎这个方法总是执行系统 Rub
在为 this question about Blue Ruby 选择的答案中,查克说: All of the current Ruby implementations are compiled to
我有一个 Ruby 数组 > list = Request.find_all_by_artist("Metallica").map(&:song) => ["Nothing else Matters"
我在四舍五入时遇到问题。我有一个 float ,我想将其四舍五入到小数点后的百分之一。但是,我只能使用 .round ,它基本上将它变成一个 int,意思是 2.34.round # => 2. 有没
我使用 ruby on rails 编写了一个小型 Web 应用程序,它的主要目的是上传、存储和显示来自 xml(文件最多几 MB)文件的结果。运行大约 2 个月后,我注意到 mongrel 进程
我们如何用 Ruby 转换像这样的字符串: 𝑙𝑎𝑡𝑜𝑟𝑟𝑒 收件人: Latorre 最佳答案 s = "𝑙𝑎𝑡𝑜𝑟𝑟𝑒" => "𝑙𝑎𝑡𝑜𝑟𝑟𝑒" s.u
通过 ruby monk 时,他们偶尔会从左侧字段中抛出一段语法不熟悉的代码: def compute(xyz) return nil unless xyz xyz.map {|a,
不确定我做错了什么,但我似乎弄错了。 问题是,给你一串空格分隔的数字,你必须返回最大和最小的数字。 注意:所有数字都是有效的 Int32,不需要验证它们。输入字符串中始终至少有一个数字。输出字符串必须
我是一名优秀的程序员,十分优秀!