os x catalina 10.15.7
$ bundle
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
An error occurred while installing eventmachine (1.2.7), and Bundler
cannot continue.
Make sure that `gem install eventmachine -v '1.2.7' --source
'https://rubygems.org/'` succeeds before bundling.
current directory:
/Library/Ruby/Gems/2.6.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
make: *** No rule to make target
`/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h',
needed by `ruby_http_parser.o'. Stop.
make failed, exit code 2
등등 엄청난 에러가 발생. jekyll기반으로 만들어진 블로그가 설치가 안되는 상황이 발생
$ brew install ruby
$ brew link --overwrite ruby
If you need to have ruby first in your PATH, run:
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc
For compilers to find ruby you may need to set:
export LDFLAGS="-L/usr/local/opt/ruby/lib"
export CPPFLAGS="-I/usr/local/opt/ruby/include"
zsh 쉘을 사용하기 때문에 ~/.zshrc에 설정하라고 위와 같은 메세지가 나온다.
쉘의 설정파일 안에 위 내용들을 추가해주면 된다.
bash 쉘을 사용한다면 ~/.bash_profile이라고 나옵니다.
참고 사이트 : github.com/ffi/ffi/issues/653