我可以在Gemfile中设置
ruby版本,如下所示:
ruby '2.0.0'
但是如果我想要一个特定版本为2.0.0-p353怎么办?
当我添加到Gemfile,我得到:
Your Ruby version is 2.0.0,but your `Gemfile` specified 2.0.0-p353
甚至可以设置一个特定的版本?
解决方法
在Bundler的版本1.3及更早版本中,您可以使用
couldn’t specify the patchlevel:
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,the docs now say:
In the
ruby
directive,:patchlevel
is optional,as patchlevel releases are usually compatible and include important security fixes. The patchlevel option checks theRUBY_PATCHLEVEL
constant,and if not specified then bundler will simply ignore it.
所以你可以这样指定patchlevel:
ruby '2.0.0',:patchlevel => '353'