[英]Install specific ruby version into vendor/bundle?
In my Gemfile I have specified ruby 2.2.7
however when I do: 在我的Gemfile中,我指定了
ruby 2.2.7
但是当我这样做时:
bundle install --path vendor/bundle
I can see that ruby 2.2.0 installed: 我可以看到安装了ruby 2.2.0:
Although, I also checked rvm which indicates ruby 2.2.7 selected: 虽然,我还检查了rvm,它指示选择了ruby 2.2.7:
rvm list
rvm rubies
* ext-ruby-2.2.1 [ missing bin/ruby ]
ruby-1.9.3-p551 [ x86_64 ]
ruby-2.1.5 [ x86_64 ]
ruby-2.2.2 [ x86_64 ]
=> ruby-2.2.7 [ x86_64 ]
ruby-2.3.1 [ x86_64 ]
And gemset: 和宝石:
rvm gemset list
gemsets for ruby-2.2.7 (found in /Users/Apple/.rvm/gems/ruby-2.2.7) (default)
=> myapp global
Any idea? 任何想法?
Bundler uses the value from RbConfig::CONFIG["ruby_version"]
to build the directory for the gems (see https://github.com/bundler/bundler/blob/master/lib/bundler/installer/standalone.rb#L38 ). Bundler使用
RbConfig::CONFIG["ruby_version"]
来构建gem的目录(请参阅https://github.com/bundler/bundler/blob/master/lib/bundler/installer/standalone.rb#L38 )。
This "ruby_version"
does not care for teeny_version value and only ever outputs the Major.Minor versions. 此
"ruby_version"
不关心teeny_version的值,仅输出Major.Minor版本。
That leads to 这导致
2.2.x -> 2.2.0 2.2.x-> 2.2.0
2.3.x -> 2.3.0 2.3.x-> 2.3.0
2.4.x -> 2.4.0 2.4.x-> 2.4.0
and so on. 等等。
I do not now why the teeny_version does get ignored. 我现在不知道为什么teeny_version确实会被忽略。 I do know, that you could use
--with-ruby-version=2.4.1
do set the value yourself. 我确实知道,您可以使用
--with-ruby-version=2.4.1
设置值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.