Help us understand the problem. What is going on with this article?

WerckerのRVM boxで削除されたバージョンのRubyを使いたい時

More than 3 years have passed since last update.

WerckerのRVM boxで古いRubyを使いたい時のメモ。

wercker/box-rvmREADME(2016/01/19時点)には、対応するRubyのバージョンが書いてあって、

- `ruby-2.0.0-p645` (deprecated)
- `ruby-2.0.0-p647`
- `ruby-2.0.0-p648`
- `ruby-2.1.6` (deprecated)
- `ruby-2.1.7`
- `ruby-2.1.8`
- `ruby-2.2.2` (deprecated)
- `ruby-2.2.3`
- `ruby-2.2.4`
- `ruby-2.3.0` (default)

とのこと。

ここに書いていないバージョン、例えば2.2.1を使おうとして、wercker.ymlに

wercker.yml
box: wercker/rvm
build:
    steps:
        - rvm-use:
            version: ruby-2.2.1

とか書くと、ruby-2.2.1 is not installed.とエラーが出る。

wercker/box-rvmのChangelogを見ると、5.0.0でRemoved ruby-2.2.1
と書いているので、ruby-2.2.1が消される前のバージョンである4.0.0を使う必要がある。

rvm-boxのバージョンを指定するには、wercker.ymlの使用するboxを指定する行で指定してやれば良い。

wercker.yml
box: wercker/rvm@4.0.0
build:
    steps:
        - rvm-use:
            version: ruby-2.2.1

READMEにも"If you want to keep using a old version you can lock the version on a box, but we strongly recommend upgrading to a newer version."と書いてある通り、新しいバージョンのboxを使うのが一番だけど、そうも行かない時のためにメモ。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away