如何通过 Ant 更新 Cuke4Duke JRuby gems
我有一个使用 Cucumber 进行 BDD 的 Java 项目。今天早上,整个事情突然停止了,我无法再安装 gems,我收到可怕的“未定义的类/模块 YAML::Syck::DefaultKey”错误。我知道我需要更新正在使用的 Rubygem 版本,但我无法做到这一点。
我已经搜索了网络和 StackOverflow,但没有找到任何适合我的情况的东西。我在整个过程中都使用ant。它下载 JRuby jar(我尝试过 1.6.1、1.6.3 和 1.6.4)。
当我尝试使用以下命令更新 rubygem 时:
java -jar ./lib/org.jruby/jruby-complete-1.6.1.jar -S gem update --system
...我收到错误:
undefined method `version' for nil:NilClass.
我已尝试先安装黄瓜,但收到相同的错误消息。
有人对如何进行这件事有任何想法吗?我会考虑切换到 cucumber-jvm,但它尚未发布到 Maven 存储库。
I have a Java project that is using Cucumber for BDD. This morning the entire thing came to a crashing halt, I can no longer install gems, I get the dreaded "undefined class/module YAML::Syck::DefaultKey" error. I know that I need to update the version of Rubygem being used, but I haven't been able to do that.
I have searched the web and StackOverflow, but haven't found anything that works for my situation. I'm using ant for the entire process. It downloads the JRuby jar (I've tried 1.6.1, 1.6.3 and 1.6.4).
When I try to update rubygem using:
java -jar ./lib/org.jruby/jruby-complete-1.6.1.jar -S gem update --system
...I get the error:
undefined method `version' for nil:NilClass.
I've tried installing cucumber first, but I get the same error message.
Anyone have any ideas on how to get this going? I would consider switching to cucumber-jvm but it isn't released to the Maven repository yet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了解决问题的方法,虽然不完全是我所希望的,但它有效。幸运的是,几个月前我已经在 JRuby 1.5.5 的实际 RVM Gemset 中安装了这些 gem。我去了那个宝石并重建了所有宝石。我将 gem 目录复制到临时目录,然后将每个 gemspec 文件复制到相应的目录,并在每个目录中运行 gem build xxxxx.gemspec。这创建了新的 gem 文件,我可以从普通的网络服务器提供这些文件。
也许可以从较新的安装中获取宝石并使用较旧的安装进行重建,我自己没有尝试过,但它可能对您有用。
I found a solution to my problem, it's not quite what I was hoping for, but it works. Fortunately I had installed these gems a few months ago in an actual RVM Gemset for JRuby 1.5.5. I went to that gemset and rebuilt all of the gems. I copied the gem directories to a temp lcoation and then copied each gemspec files to the appropriate directory and ran
gem build xxxxx.gemspec
in each directory. This created new gem files which I am able to serve from a plain webserver.It may be possible to grab gems from a newer install and rebuild with an older install, I didn't try that myself, but it might work for you.