기본 콘텐츠로 건너뛰기

추천 가젯

Mac] Rails mysql2 gem 설치시 에러 해결하기

> bin/bundle install ... Gem::Ext::BuildError: ERROR: Failed to build gem native extension. ... Don't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load ... make: *** [mysql2.bundle] Error 1 make failed, exit code 2 ... An error occurred while installing mysql2 (0.5.2), and Bundler cannot continue. Make sure that `gem install mysql2 -v '0.5.2' --source 'https://rubygems.org/'` succeeds before bundling. 이런식으로 설치가 안될때가 있다. 빌드시 라이브러리를 못찾아서 발생하는 문제이다. > gem install mysql2 -v '0.5.2' -- --with-cflags=\"-I/usr/local/opt/openssl/include\" --with-ldflags=\"-L/usr/local/opt/openssl/lib\" 이렇게 하면 gem 설치가 가능하다. bin/bundle config --local build.mysql2 "--with-cppflags=-I/usr/local/opt/openssl/include" bin/bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib" bin/bundle install bundler 를 이용해서 설치할때는 이런 식으로 하면 된다.

최근 글

월든 - 헨리 데이비드 소로

에버노트에서 노션(Notion) 이사 후기

번역] 테트라 슈퍼 쌍기 스펀지 여과기 설명서

터미널에서 파일 마지막 라인 삭제하기