LoginSignup
4
2

More than 5 years have passed since last update.

RedmineをAnsible playbookでインストール中にBundlerエラー(Ubuntu 16.04)

Last updated at Posted at 2019-02-11

1 環境

Redmine 3.4.8 stable
Ubuntu 16.04.5 LTS
PostgreSQL 9.5

2 Ansible playbookで簡単インストール

ちょっとしたHWトラブルで、OSから含め何度もクリーン環境を作ることがあったのですが、公式サイトで公開されているAnsible playbookを使うと、数ステップでインストール完了するのでとても楽です。
http://redmine.jp/install/
https://github.com/farend/redmine-ubuntu-ansible

実施手順などは、上記の説明に従って進めてください。
先人の方々に本当に感謝ですね。

3 インストールがこけた・・・

さて、Ansible playbookでインストールを進めていきます。

$ ansible-playbook -K -i hosts site.yml

すると、gemsパッケージのインストールのところで失敗し止まってしまいました。
(2019/02/11時点です、今後改善されるかもしれません)

インストール中のエラーログ
(省略)
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["bundle", "install", "--path", "vendor/bundle"], "delta": "0:00:02.892941", 
(省略)
 bundler (< 2.0.0, >= 1.5.0)\n\n  Current Bundler version:\n    bundler (2.0.1)\nThis Gemfile requires a different version of Bundler.\nPerhaps you need to update Bundler by running `gem install bundler`?\n\nCould not find gem 'bundler (< 2.0.0, >= 1.5.0)' in any of the relevant sources:\n  
(省略)
localhost                  : ok=23   changed=18   unreachable=0    failed=1   

どうやら、bundlerのバージョンが要件(2.0.0よりも前、1.5.0以上)に合っていないため、エラーで止まってしまったようです。

4 Bundlerのバージョン確認と、旧バージョンを指定して入れ直し

bundlerが新しいものが入ってしまっていたようです。

$ bundler -v
Bundler version 2.0.1

インストール可能なバージョンの一覧をチェックしてみます。

$ gem search ^bundler$ --all

*** REMOTE GEMS ***

bundler (2.0.1, 2.0.0, 1.17.3, 1.17.2, 1.17.1, 1.17.0, 1.16.6, (長いので省略)

今回は、1.17.3がちょうど都合が良さそうなので、こちらに入れ替えてみます。

$ sudo gem uninstall bundler
$ sudo gem install bundler -v 1.17.3 --no-rdoc --no-ri

これでAnsible playbookを再実行して、無事インストール完了です。

4
2
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
4
2