ruby에서 bundle install시 ruby.h 헤더 파일을 찾을수 없다고 나오는 경우

[root@dev newrelic_nginx_agent]# bundle install

Fetching gem metadata from http://rubygems.org/………..Fetching
gem metadata from http://rubygems.org/..Resolving dependencies…
Using daemons (1.1.9)
Installing json (1.8.0)Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rbmkmf.rb can’t find header files for ruby at /usr/lib/ruby/ruby.h

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/json-1.8.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/json-1.8.0/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.0), and Bundler cannot continue.
Make sure that `gem install json -v ‘1.8.0’` succeeds before bundling.

ruby 개발 버전을 설치 하면 됩니다.

[root@dev ~]# yum install ruby-devel rubygems

[root@dev newrelic_nginx_agent]# bundle install

Fetching gem metadata from http://rubygems.org/………..
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies…
Using daemons (1.1.9)
Installing json (1.8.0)
Installing newrelic_plugin (1.3.0)
Using bundler (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

참고