微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ruby-on-rails – 在宝石文件中设置宝石版本

我可以在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 the RUBY_PATCHLEVEL constant,and if not specified then bundler will simply ignore it.

所以你可以这样指定patchlevel:

ruby '2.0.0',:patchlevel => '353'

原文地址:https://www.jb51.cc/ruby/272392.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐