简体   繁体   English

CircleCI没有选择正确的Ruby版本

[英]CircleCI not picking up correct Ruby version

I'm specifying Ruby version 2.2.2 in my Gemfile and .ruby-version file but CircleCI seems to be using 2.2.0. 我在我的Gemfile.ruby-version文件中指定了Ruby版本2.2.2,但是CircleCI似乎正在使用2.2.0。

Here's what I see in CircleCI's logs: 这是我在CircleCI日志中看到的内容:

/home/ubuntu/my-project/vendor/bundle/ruby/2.2.0/gems/htmlentities-4.3.2/lib/htmlentities/mappings/expanded.rb:465: warning: duplicated key at line 466 ignored: "inodot" /home/ubuntu/my-project/vendor/bundle/ruby/2.2.0/gems/htmlentities-4.3.2/lib/htmlentities/mappings/expanded.rb:465:警告:第466行的重复键被忽略:“ inodot ”

Notice the 2.2.0 in that path. 请注意该路径中的2.2.0

How can I get CircleCI to use the right Ruby version? 如何获得CircleCI使用正确的Ruby版本?

CircleCI uses RVM to provide access to different Ruby versions. CircleCI使用RVM提供对不同Ruby版本的访问。 You can specify the ruby version to be used in circle.yml file as follows. 您可以如下指定在circle.yml文件中使用的红宝石版本。

machine:
  ruby:
    version: rbx-2.2.2   

Reference doc: https://circleci.com/docs/language-ruby-on-rails 参考文档: https : //circleci.com/docs/language-ruby-on-rails

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM