sandbox-memo

開発してて出たエラーをメモる場所

BitBucketのPipelineのBuildが失敗した

f:id:aktkro:20180506045345p:plain

Warning: the running version of Bundler (1.14.6) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Your Ruby version is 2.4.0, but your Gemfile specified 2.4.1

とかいわれて、Buildがとまってしまった。

お前のRubyのバージョンとGemfileのバージョンちげーし、そんなんじゃビルドしねーし。とのこと。

あわててvi GemfileするもGemfileにはちゃんとruby '2.4.1'と書いてある。

いちおruby -vしてみたけどruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]だった。なんの問題もないはず。

うーん、意味わからん。。。

混乱しながらファイルを漁っていたら、bitbucket-pipelines.ymlに気になる記述を発見

# This is a sample build configuration for Ruby.
# Check our guides at https://confluence.atlassian.com/x/8r-5Mw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: ruby:2.4.0

pipelines:
  default:
    - step:
        caches:
          - bundler
        script: # Modify the commands below to build your repository.
          - bundle install
          
definitions:
  caches:
    bundler: ./vendor

6行目にimage: ruby:2.4.0ってやつがいるじゃないか。

こいつをimage: ruby:2.4.1に書き換えてpushしたら、無事にビルド成功しましたよっと。 めでたしめでたし。