kb84tkhrのブログ

何を書こうか考え中です あ、あと組織とは関係ないってやつです 個人的なやつ

PPP3: Redmineのインストール

メッセージを読む

Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root users on this machine.

これはrootでやるなよってだけだから無視
わかってやってるはず(と信じる

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.

tzinfo-dataは使われない
これも無視でいいんじゃないかな
ということは

Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    bundler (< 2.0.0, >= 1.5.0)

  Current Bundler version:
    bundler (2.0.1)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (< 2.0.0, >= 1.5.0)' in any of the relevant sources:
  the local ruby installation

これだろうな

Bundlerはgem “bundler”と互換性のあるバージョンを見つけることが
できませんでした、ってなにか変な気もするけど
まあとにかくbundlerのバージョンを1.5.0以上2.0.0未満にしろと
今は2.0.1だぞと

update Bundler by running gem install bundler、って
言ってるけどバージョン下げるにはどうしたらいいんですか

$ gem install --help
Usage: gem install GEMNAME [GEMNAME ...] [options] -- --build-flags [options]

  Options:
        --platform PLATFORM          Specify the platform of gem to install
    -v, --version VERSION            Specify version of gem to install
        --[no-]prerelease            Allow prerelease versions of a gem
                                     to be installed. (Only for listed gems)
  :
  :

-v
で2.0.0未満の最新バージョンってなんなの

Releases · bundler/bundler

1.17.3のようだ

いったん2.0.1をアンインストールしたほうがいいかなー
まずはそのままやってみよ

$ sudo gem install bundler -v 1.17.3
Fetching: bundler-1.17.3.gem (100%)
Successfully installed bundler-1.17.3
Parsing documentation for bundler-1.17.3
Installing ri documentation for bundler-1.17.3
Done installing documentation for bundler after 3 seconds
1 gem installed

入ったか
どうだろう?

$ bundler --version
Bundler version 2.0.1

だめだった

$ gem list

*** LOCAL GEMS ***

  :
bundler (2.0.1, 1.17.3)
  :

2.0.1をアンインストールしないとダメか
バージョン指定のアンインストールはこうかな?たぶん?

$ sudo gem uninstall bundler -v 2.0.1
Successfully uninstalled bundler-2.0.1
$ bundler --version
Bundler version 1.17.3

いけたか
では

$ ansible-playbook -K -i hosts site.yml
  :
TASK [完了] *********************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": "インストールが完了しました。 http://10.0.2.15/redmine/  にアクセスしてください。"
}

できた!
表示された!

f:id:kb84tkhr:20190516224706p:plain