shimgo
7/26/2017 - 2:41 PM

development環境でサーバを実行しているのにundefined method `web_console'が出る

development環境でサーバを実行しているのにundefined method `web_console'が出る

Gemfileに以下のように記載しているのにサーバ起動時にundefined method `web_console'が出てしまう。

group :development do
  gem 'web-console', '~> 2.0'
end

この環境はdockerで構築していて、その際以下のコマンドを実行していた。
これが一度実行されると.bundle/configにBUNDLE_WITHOUT: developmentというオプションが追加され、以後bundle installしたものはすべてproduction環境のgemしかインストールされない。

bundle install -j4 --without development test --path vendor/bundle