将黄瓜与 jruby 一起使用

发布于 2024-09-19 22:18:50 字数 688 浏览 4 评论 0原文

在公司的 Intranet 上工作

  • 我正在使用cucumber 0.8.5
  • gherkin 2.1.5

,并且尝试从使用 ruby​​ 1.8.7 切换到 jruby 1.5.1

但是,每当我尝试从 jruby 运行 cucumber 时,都会收到错误:

% jruby -S cucumber
/usr/local/src/jruby-1.5.1/lib/ruby/site_rub/1.8/rubygems/custom_require.rb:31:in `require': no such file to load -- gherkin (LoadError)

我认为这是 b/c gherkin 2.1.5 是本机扩展,jruby 无法处理它:

% jgem install gherkin-2.1.5.gem
...
ERROR: Error installing gherkin-2.1.5.gem:
       ERROR: Failed to build gem native extension.

现在,我很想尝试更新版本,但由于这是在受保护的 Intranet 上,因此导入新软件是PITA,需要一些时间。

有人对如何使我拥有的软件正常工作有任何建议吗?我是否缺少正确的配置设置或类似的设置?

I'm working on my company's intranet with

  • cucumber 0.8.5
  • gherkin 2.1.5

And I'm trying to switch from using ruby 1.8.7 to jruby 1.5.1

However, whenever I try to run cucumber from jruby, I get an error:

% jruby -S cucumber
/usr/local/src/jruby-1.5.1/lib/ruby/site_rub/1.8/rubygems/custom_require.rb:31:in `require': no such file to load -- gherkin (LoadError)

I think this is b/c gherkin 2.1.5 is a native extension, and jruby can't handle it:

% jgem install gherkin-2.1.5.gem
...
ERROR: Error installing gherkin-2.1.5.gem:
       ERROR: Failed to build gem native extension.

Now, I'd love to just try updating versions, but since this is on a protected intranet, importing new software is a PITA, and takes some time.

Does anyone have any suggestions of how I can make the software I have work? Am I missing a proper configuration setting or some such?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一页 2024-09-26 22:18:50

您需要安装 JRuby 版本的 Gherkin。如果您简单地这样做,

jgem install gherkin

您将自动获得正确的版本。否则,您必须自己找出 Gherkin gem 的 JRuby 版本的 URI 并手动下载它。

但实际上,如果你所在的公司要求你完成一份工作,然后把你的双手绑在背后,你唯一能做的明智之举就是:跑,跑得尽可能快,跑得尽可能远。

You need to install the JRuby version of gherkin. If you simply do

jgem install gherkin

you will get the correct version automatically. Otherwise, you have to figure out the URI to the JRuby version of the gherkin gem yourself and download it by hand.

But really, there is only one sensible thing you can do if you are working for a company that asks you to do a job and then ties your hands behind your back: run, as fast as you can, as far away as you can.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文