debugger, pry-debugger を使うと rspec の debug 等便利ですが、Ruby 2.1.2 にバージョンあげると衝突する模様。
どんな問題か
Ruby 2.1.2 環境で bundle で debugger をいれようとする、或いは、gem install debugger すると下記のようなエラーになる。
Building native extensions. This could take a while... ERROR: Error installing debugger: ERROR: Failed to build gem native extension. /path/to/ruby extconf.rb *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
解決
- PR あり *1
- 実際には http://qiita.com/217/items/44015101660bb935b924 の手順を追います
$ git clone https://github.com/mekishizufu/debugger.git $ git checkout ca451a9bdf $ gem build debugger.gemspec $ gem install debugger-1.6.6.gem