EC2内でbundle installしたらコケるとき
環境
現象
$ bundle install /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- io/console (LoadError) from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/shell/basic.rb:2:in `<top (required)>' from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/shell/color.rb:1:in `<top (required)>' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/shell.rb:17:in `shell' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.10.6/lib/bundler/ui/shell.rb:14:in `initialize' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.10.6/lib/bundler/cli.rb:12:in `new' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.10.6/lib/bundler/cli.rb:12:in `rescue in start' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.10.6/lib/bundler/cli.rb:10:in `start' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.10.6/bin/bundle:20:in `block in <top (required)>' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.10.6/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors' from /home/ec2-user/.gem/ruby/2.0/gems/bundler-1.10.6/bin/bundle:18:in `<top (required)>' from /home/ec2-user/bin/bundle:23:in `load' from /home/ec2-user/bin/bundle:23:in `<main>'
対処法
$ sudo yum install ruby-devel gcc-c++ [...] $ gem install io-console Fetching: io-console-0.4.2.gem (100%) Building native extensions. This could take a while... Successfully installed io-console-0.4.2 Parsing documentation for io-console-0.4.2 Installing ri documentation for io-console-0.4.2 Done installing documentation for io-console after 0 seconds 1 gem installed
参考
追記
うん?なんで会社の方に書かないで個人の方に書いてるんだ?
http://b.hatena.ne.jp/rokujyouhitoma/20150724#bookmark-260524814
鋭いツッコミだ…。最新のAMIで再現するか確認してないからです。言わせんな恥ずかしい////