我显然在这里遗漏了一些东西。我正在尝试安装 Torquebox Gems,但遇到了此错误(在 Mac 上):
gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/
Could not find a valid gem 'torquebox-server' (>= 0), here is why:
Found torquebox-server (2.x.incremental.424), but was for platform java
我安装了jruby,版本1.6.3。它在我的道路上。我不明白上面的错误。如果您需要更多信息,请告诉我。
最佳答案
马克:
看起来它正在使用 MRI 版本的 gem。如果 JRuby 在您的路径中,请尝试:
jruby -S gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/
您可能还需要通过 JRuby 显式运行 Torquebox 命令:
jruby -S torquebox deploy .
jruby -S torquebox run
此外,如果可能的话,您应该升级到 JRuby 1.6.4 - 它修复了我们在 1.6.3 中遇到的一些问题,也是我们当前测试 TorqueBox 的工具。
关于rubygems - 为 java 构建的 gem 如何工作?安装 Torquebox gem 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7411276/