0
我想在我的Mac上的rails環境中設置一個ruby,以便開始使用RubyMine IDE。 我用自制,rbenv,爲了安裝的Ruby/Rails所需的所有其他庫 - 但是當我sudo gem install rails
安裝失敗,因爲:Rails安裝失敗 - 由Nokogiri寶石引起?
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
current directory: /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8.1/ext/nokogiri
/usr/local/opt/ruby/bin/ruby -r ./siteconf20161110-767-xwnfls.rb extconf.rb
checking if the C compiler accepts ... yes
checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using packaged libraries.
Using mini_portile version 2.1.0
checking for iconv.h... yes
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** 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.
我試圖在它自己的安裝引入nokogiri和我得到的以下錯誤:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8.1/.autotest
我真的希望有人能幫助我,因爲我是一個相當有小白到RonR,我覺得事情變得凌亂目錄/權限明智的,
謝謝。
嘿, 我沒有那麼多的意見,因爲我已經安裝了問題上下文中所述的自制軟件,rbev和rvm。其次,zlib不是自制軟件包。只有我已經安裝的lzlib。 謝謝 – AcidMicrowave
做'brew search zlib'。我在OS X 10.10上,並擁有該軟件包。它可能不在主要存儲庫中。對不起,我最初誤解你已經用'rbenv'設置了一切。如果是這樣的話,你不應該使用'sudo'來運行'gem install'。看看你是否可以通過搜索找到'zlib',我記得從Caskroom或其他前綴的10.11開始設置它。 –
我試過尋找它沒有運氣:(IM在10月12日的方式,我似乎無法弄清楚如何使用Caskroom將幫助我安裝它? 再次感謝 – AcidMicrowave