2017-10-31 12 views
2

번들 설치 또는 Gem Install Nokogiri를 실행할 때 내 앱이 실행되지 않는 것과 같은 문제가 발생합니다. 나는이 문제가 지역적이며 모든 것이 레일즈 5로 옮겨 졌음을 의심한다. 그러나 나는 확실하지 않다. 다음은 오류 메시지입니다 :Nokogiri v 1.8.1 번들 설치시 번들 설치

An error occurred while installing nokogiri (1.8.1), and Bundler cannot 
continue. 
Make sure that `gem install nokogiri -v '1.8.1'` succeeds before bundling. 

In Gemfile: 
    rails_admin was resolved to 1.2.0, which depends on 
    rails was resolved to 5.1.3, which depends on 
     actioncable was resolved to 5.1.3, which depends on 
     actionpack was resolved to 5.1.3, which depends on 
      actionview was resolved to 5.1.3, which depends on 
      rails-dom-testing was resolved to 2.0.3, which depends on 
       nokogiri 

(즉, 번들 설치 실행에서 유래) 나 번들 업데이트를 실행하고 Github에서 권장하는 다양한 브루 명령을 사용하려고했습니다 ,하지만 나는 어떤 성공을 없었어요. 당신이 libxml2를 같은 디바이스 라이브러리가 없기 때문에

보석 '1.8.1'노코 기리 -v를 설치

1 error generated. 
make[2]: *** [xmlIO.lo] Error 1 
make[1]: *** [all-recursive] Error 1 
make: *** [all] Error 2 
======================================================================== 
*** 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. 
+0

''양조 의사 '를 실행 해 보셨습니까? 몇 가지를 다시 연결해야 할 수도 있습니다. –

+0

'gem install nokogiri -v '1.8.1'을 실행 해 보셨습니까? – Cyzanfar

+0

@Cyzanfar 방금 시도해 봤는데 그 오류가있는 게시물을 업데이트했습니다 – user7406101

답변

1

노코 기리은 normaly 구축하는 데 실패합니다. 무슨 일이 일어 나는지 또는 직접 libxml2를 설치하려고하는 로그 파일을 봐 brew install libxml2

먼저 다음이

sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzmadev 

을하려고 (우분투) http://www.nokogiri.org/tutorials/installing_nokogiri.html

1

에 Nokogiry에서 제공하는 가이드를 throubleshoting보기 설치를 시도하십시오.