Retired Colourman

何度も朝がやってくる

gemをインストールする際のエラー(rbenv)

OSをぶっ飛ばしたので環境を再構築した時にはまったので。

$gem install bundler
ERROR: Loading command: install (LoadError)
  cannot load such file -- zlib 
ERROR: While executing gem ... (NameError) 
  uninitialized constant Gem::Commands::InstallCommand

Question #213446 : Questions : “rubygems” package : Ubuntu

どうやらzlib1g-devというパッケージがなかった模様。

$sudo apt-get install  zlib1g-dev
$rbenv uninstall <ruby-version>
$rbenv install <ruby-version>
$gem install bundler

で解決する。