gpt4 book ai didi

rake: NameError: 未初始化的常量配置

转载 作者:行者123 更新时间:2023-12-01 22:33:45 26 4
gpt4 key购买 nike

我正在安装 Redmine,但由于抽成问题,我快疯了。特别是,为了对不同的 Ruby 插件执行捆绑安装,我被要求安装 xapian-full-alaveteli,v 1.2.9.5。问题是我收到以下错误:

Building native extensions.  This could take a while...
ERROR: Error installing xapian-full-alaveteli:
ERROR: Failed to build gem native extension.

/home/redmine/.rvm/rubies/ruby-2.2.0/bin/ruby -rubygems /home/redmine/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.4.2/bin/rake RUBYARCHDIR=/home/redmine/.rvm/gems/ruby-2.2.0/extensions/x86_64-linux/2.2.0/xapian-full-alaveteli-1.2.9.5 RUBYLIBDIR=/home/redmine/.rvm/gems/ruby-2.2.0/extensions/x86_64-linux/2.2.0/xapian-full-alaveteli-1.2.9.5
rake aborted!
NameError: uninitialized constant Config
/home/redmine/.rvm/gems/ruby-2.2.0/gems/xapian-full-alaveteli-1.2.9.5/Rakefile:2:in `<top (required)>'
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in /home/redmine/.rvm/gems/ruby-2.2.0/gems/xapian-full-alaveteli-1.2.9.5 for inspection.
Results logged to /home/redmine/.rvm/gems/ruby-2.2.0/extensions/x86_64-linux/2.2.0/xapian-full-alaveteli-1.2.9.5/gem_make.out

我已经尝试手动编辑 rakefile 并删除导致问题的行,但它神奇地重新出现了。关于使用 rake/gem 的文档,恕我直言,至少是模糊的,因此我完全被困住了——两天前应该在生产中的服务器......

最佳答案

总结

对 Config 的过时调用可能会导致错误。尝试改变

Config::CONFIG    ====>    RbConfig::CONFIG

详细

运行 Gem 的 rakefile 导致错误:未初始化的常量配置。

谷歌搜索建议 Config is obsolete and to replace it with RbConfig. RbConfig 在最新的 Ruby 中 though the document is blankI cannot find a Config in Ruby .

修复将 Config 替换为 RbConfig:gettalong/kramdownthoughtbot/cocaine .这也适用于我的情况。

结论

Config::CONFIG 替换为 RbConfig::CONFIG

关于rake: NameError: 未初始化的常量配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28216924/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com