如何根据当前的RVM在Gemfile中选择特定的gem?
如何根据当前使用的 Ruby VM 有条件地选择使用哪个 gem?
理想情况下,我想要这样的东西:
if [using jruby]
gem 'jruby-openssl'
如果使用的 RVM 是 JRuby,则仅需要 jruby-openssl。
How can I conditionally choose which gem to use based on the Ruby VM currently in use?
Ideally I would like something like:
if [using jruby]
gem 'jruby-openssl'
This would only require the jruby-openssl if the RVM being used is JRuby.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Gemfile 中使用以下内容,如下所示:https://github.com/jruby/activerecord-jdbc-adapter
Use the following in your Gemfile, as documented here: https://github.com/jruby/activerecord-jdbc-adapter
试图在这里回答我自己的问题。
我们可以使用以下 Gemfile 指令来做到这一点:
Attempting to answer my own question here.
We can do this using the following Gemfile directive: