Gem::Ext::BuildError: 错误: 无法构建 gem 本机扩展。在CenOS 6.5上

2023-11-30

安装Redmine。 我试过了,

bundle install --without development test postgresql sqlite

,但是错误。

Gem::Ext::BuildError: 错误: 无法构建 gem 本机扩展。

current directory:
/usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
/usr/local/bin/ruby -r ./siteconf20161228-21055-1dxe9y9.rb extconf.rb
creating Makefile

current directory:
/usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean

current directory:
/usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
generator.c: In function ‘generate_json’:
generator.c:861: error: ‘rb_cFixnum’ undeclared (first use in this
function)
generator.c:861: error: (Each undeclared identifier is reported only
once
generator.c:861: error: for each function it appears in.)
generator.c:863: error: ‘rb_cBignum’ undeclared (first use in this
function)
At top level:
cc1: warning: unrecognized command line option "-Wno-self-assign"
cc1: warning: unrecognized command line option
"-Wno-constant-logical-operand"
cc1: warning: unrecognized command line option
"-Wno-parentheses-equality"
cc1: warning: unrecognized command line option
"-Wno-tautological-compare"
make: *** [generator.o] error 1

make failed, exit code 2

Gem files will remain installed in
/usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3 for inspection.
Results logged to
/usr/local/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0-static/json-1.8.3/gem_make.out

An error occurred while installing json (1.8.3), and Bundler
cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before
bundling.

所以,我尝试过gem install json -v '1.8.3,但我无法解决它。

您介意读一下这个问题吗?


Ruby 2.4 非常新。事实上,它仅在三天前发布。

由于 Ruby 2.4 中有几个重要的内部更改,因此很可能许多 gem(以及 Redmine 本身)尚未与该版本的 Ruby 兼容。

从您的错误消息来看,确实似乎需要调整 JSON gem 才能处理 Ruby 2.4 中有关整数的一些更改。

您现在应该使用旧版本的 Ruby,例如红宝石 2.3.3。正如你所看到的http://www.redmine.org/projects/redmine/wiki/RedmineInstall#Ruby-interpreter, Redmine 需要特定的 Ruby 版本,具体取决于 Redmine 的版本。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Gem::Ext::BuildError: 错误: 无法构建 gem 本机扩展。在CenOS 6.5上 的相关文章

  • 通过 has_many 进行多个数据库连接

    如何通过使用多个数据库连接来创建 has many 我有一个名为 master 的数据库 其中保存位置信息 这是从单独的应用程序更新的 用户可以访问许多位置 但所有其他模型都位于另一个名为 budget 的数据库中 以下是模型的设置方式 p
  • 重新归档 simple_form 未定义方法 Attachment_field

    I am trying to hook up refile to my view and I am getting the following error 这是我的模型 class Job lt ActiveRecord Base acts
  • 使用 shoulda 重构 Rails 模型上的 rspec 测试

    了解后应该匹配器 https github com thoughtbot shoulda matchers通过回答关于属性可访问性测试的另一个 StackOverflow 问题 https stackoverflow com a 11849
  • Ruby 反向柯里化:这可能吗?

    关于 Ruby 1 9 x 中的柯里化 我一直在某些地方使用它 并且可以像基本上支持 proc 参数的默认参数一样进行翻译 p proc x y z x y z p curry 1 gt returns a lambda p curry 1
  • 嵌套对象的 AJV 模式验证

    函数返回的对象看起来像这样 answer vehicle type 1 message Car model VW color red 答案 对象始终存在 其他字段基于 vehicle type E g 如果vehicle type 1 则有
  • Rails - 使链接与 ajax 一起工作

    我有一个链接 应该使用 ajax 加载它旁边的部分内容 而无需重新加载页面 链接在这里 这是链接应该转到的控制器 class ProfilesController lt ApplicationController def profile f
  • 根据 Java 环境变量中的值创建使用 @JsonIgnore 的自定义注释

    我需要创建一个新的注释 用于在环境变量设置时忽略输出 JSON 文件中的字段var false 我尝试使用JsonAnnotationIntrospector 但无法获得预期的输出 public class Vehicle String v
  • 如何使用 JSON.net 引用外部文件?

    这是当 JSON net 尝试读取我的 JSON 架构时出现的错误 return JsonSchema Read new JsonTextReader reader 2014 07 15 15 33 42 7011 Fatal Newton
  • ruby 中的 unshift + file.join

    unshift File join File dirname FILE vendor addressable 2 1 0 lib addressable uri 上面的代码是否访问具有以下路径的文件 vendor addressable 2
  • Rails 中的多列主键

    我正在尝试将桌面应用程序迁移到rails 还处理相当老式的现有数据库 问题是我在一列中没有唯一的 ID 但表的三列保证了记录的唯一性 鉴于我有三个表 authors author name author letter author nr1
  • 通过 MQTT 将 LoRa 测量结果发送到 Fiware IOT 代理

    我有 LoRa 传感器 它使用 Cayenne LPP 格式有效负载发送测量值 我的网关 LOrank8v1 捕获这些数据包并将其转换为 UDP 网关中有一个服务 lora gateway bridge 它将数据包从 UDP 转换为 TCP
  • 如何使用 ActiveAdmin 创建 STI 子类的对象

    给出以下设置 当前不起作用 class Employee lt ActiveRecord Base end class Manager lt Employee end ActiveAdmin register Employee do for
  • 遏制gem安装:捆绑安装失败,但正常gem安装有效[关闭]

    这个问题不太可能对任何未来的访客有帮助 它只与一个较小的地理区域 一个特定的时间点或一个非常狭窄的情况相关 通常不适用于全世界的互联网受众 为了帮助使这个问题更广泛地适用 访问帮助中心 help reopen questions solve
  • 如何将命令行参数传递给 rake 任务

    我有一个 rake 任务需要将一个值插入到多个数据库中 我想从命令行或从another耙任务 我怎样才能做到这一点 您可以通过向任务调用添加符号参数来指定 rake 中的形式参数 例如 require rake task my task a
  • 如何 json_normalize() df 中的特定字段并保留其他列? [复制]

    这个问题在这里已经有答案了 这是我的简单示例 我的实际数据集中的 json 字段非常嵌套 因此我一次解压一层 我需要在 json normalize 之后保留数据集上的某些列 https pandas pydata org docs ref
  • 一起使用 Argparse 和 Json

    我是 Python 初学者 我想知道 Argparse 和 JSON 是否可以一起使用 说 我有变量p q r 我可以将它们添加到 argparse 中 parser add argument p param1 help x variabl
  • 仅适用于安全页面的安全回形针 URL

    我正在尝试找到使回形针网址安全的最佳方法 但仅限于安全页面 例如 显示存储在 S3 中的图像的主页是http mydomain com http mydomain com图像网址是http s3 amazonaws com mydomain
  • 在 php 中回显 JSON 数据

    我正在尝试回显一些 JSON 数据 问题是数据包含变量 但我的代码没有将变量放入字符串中 这是我的代码 status row Status priority row Priority echo status status priority
  • 您可以使用 JSONP 检索您的 Skype 状态吗?

    有谁知道使用 JSONP 获取 Skype 状态的 URL 到目前为止我只找到了一个 XML 状态 URL http mystatus skype com username xml 我正在尝试使用 AJAX 查询 Skype 是的 我可以使
  • 无法读取解析推送通知包数据

    我尝试使用 Parse 推送通知服务发送自定义数据 但从 Bundle 中提取时总是返回 null 值 自定义广播接收器 Override public void onReceive Context context Intent inten

随机推荐