1
0

More than 5 years have passed since last update.

Gemで最新版(x.x.x.rc)がインストールできない

Posted at

RubyGemでxxxxx.rcとなっているバージョンのgemがインストールできなかったのでメモ。今回は「ec2ssh」というGemをインストールしようとしてみました。

結論

以下のように明示的にrcのバージョンを指定すればインストールできます。

$gem install ec2ssh -v 3.1.0.rc2

検証した時のメモ

インストール対象のgemについて検索してみます。

$gem search -r ^ec2ssh$ -d

*** REMOTE GEMS ***

EC2ssh (0.1.6)
    Author: Ramon Salvadó
    Homepage: http://github.com/rsalvado/ec2ssh

    A script to make it easier to ssh into running amazon EC2 instances.

ec2ssh (3.0.3)
    Author: Issei Naruta
    Homepage: http://github.com/mirakui/ec2ssh

    A ssh_config manager for AWS EC2

こうなっていますが、実際にrubygemsのページを確認すると「ec2ssh」の最新版は3.1.0.rc2となっています。

他のgemではどうなるのか確認してみます

$gem search -r ^mime-types$ -d

*** REMOTE GEMS ***

mime-types (3.0)
    Author: Austin Ziegler
    Homepage: https://github.com/mime-types/ruby-mime-types/

    The mime-types library provides a library and registry for
    information about MIME content type definitions

普通に最新版が表示されています。
ということは検索などのコマンドには問題がなさそうでバージョン名にrcというのが入っているのがポイントだと思われますね。。。

次に利用できるバージョン一覧をqueryコマンドを使って確認します。

$gem query -ra ^ec2ssh$

*** REMOTE GEMS ***

EC2ssh (0.1.6, 0.1.5, 0.1.4, 0.1.3)
ec2ssh (3.0.3, 3.0.2, 3.0.1, 3.0.0, 2.0.8, 2.0.7, 2.0.6, 2.0.5, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 1.0.3, 1.0.2, 1.0.1)

一覧にも表示されませんね。。。
とはいえ一応できるかやってみます。

$gem install ec2ssh -v 3.1.0.rc2
Fetching: ec2ssh-3.1.0.rc2.gem (100%)
Successfully installed ec2ssh-3.1.0.rc2
1 gem installed

あら、できますね。。。。
末尾にrcと付くバージョンをダウンロードする場合には明示的にバージョンを指定しないとダメなんですね。。。

無事ダウンロードできました。

$ec2ssh version
ec2ssh 3.1.0.rc2
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0