我可以在 Gemfile 中设置红宝石版本,如下所示:
I can set ruby version in Gemfile as follows:
ruby '2.0.0'但是如果我想将特定版本设为 2.0.0-p353 ?
But what if I want to have a particular version as 2.0.0-p353?
当我将其添加到 Gemfile 时,我得到:
When I add it to Gemfile, I get:
Your Ruby version is 2.0.0, but your `Gemfile` specified 2.0.0-p353是否甚至可以设置特定版本?
Is it even possible to set a particular version?
推荐答案在Bundler的1.3版或更早版本中,无法指定补丁程序级别 :
In Version 1.3 and earlier of Bundler you couldn’t specify the patchlevel:
ruby 指令显式地排除了指定补丁程序级别的能力。 Ruby修补程序通常包含重要的错误和安全修复程序,并且兼容性极强。
The ruby directive explicitly leaves out the ability to specify a patch level. Ruby patches often include important bug and security fixes and are extremely compatible.
此版本在版本1.5中已更改,文档现在说:
This changed in version 1.5, the docs now say:
在 ruby 指令,:patchlevel 是可选的,因为修补程序级别的发行版通常是兼容的,并且包含重要的安全修复程序。 patchlevel选项检查 RUBY_PATCHLEVEL 常量,如果未指定常量,则捆绑程序将忽略它。
In the ruby directive, :patchlevel is optional, as patchlevel releases are usually compatible and include important security fixes. The patchlevel option checks the RUBY_PATCHLEVEL constant, and if not specified then bundler will simply ignore it.
因此您可以这样指定补丁级别:
So you can specify the patchlevel like this:
ruby '2.0.0', :patchlevel => '353'更多推荐
在Gemfile中设置红宝石版本
发布评论